Problem/Motivation

Menu router items don't support %-style or @-style placeholders for custom title callbacks using t(). Thus check_plain()ed is always used. This doesn't support the kind of functionality needed.

It was noted that this is a regression from D5 which never got corrected in D6.

Proposed Resolution

  1. Convert some of these page callbacks into actual title callbacks.
  2. Resolve without losing built-in securing or making API changes

Remaining tasks

  1. Determine whether #1 of the proposed resolution is still a valid resolution given #2 of proposed resolution.
  2. Determine whether latest patch addresses #2of the proposed resolution
  3. Determine what needs to be used in order to change local task titles.
  4. Reroll sun's patch, hopefully in a way that the bot passes.
  5. Add conversions to patch
  6. Test the rerolled patch.

Original Summary by sun

Offshoot from #550228: Configuration page: Media category:

Menu router items cannot use %-style or @-style placeholders in 'title arguments' for custom 'title callback's that are using t(). The result is always check_plain()ed.

Defining 'options' => array('html' => TRUE) for menu router items is also not taken over.

We have many other places in core where we need custom title callbacks that process and convert a menu loader argument into proper arguments for usage in t(), and all of those currently use drupal_set_title() in the 'page callback' of the menu router item directly.

Comments

webchick’s picture

Title: Menu router items: Allow to pass PASS_THROUGH to t() » Regression: Menu router items: Allow to pass PASS_THROUGH to t()
Version: 6.x-dev » 7.x-dev
Category: task » bug

Fixing version. We added PASS_THROUGH in D7.

Also labeling as a regression and re-filing as a bug report, since this was possible in D5.

sun’s picture

Title: Regression: Menu router items: Allow to pass PASS_THROUGH to t() » Menu router items: Allow to pass PASS_THROUGH to t()
Version: 7.x-dev » 6.x-dev
Category: bug » task

oh, I wanted to leave a pointer to this example function: http://api.drupal.org/api/function/node_page_edit/7

sun’s picture

Title: Menu router items: Allow to pass PASS_THROUGH to t() » Regression: Menu router items: Allow to pass PASS_THROUGH to t()
Version: 6.x-dev » 7.x-dev
Category: task » bug

oops

chx’s picture

Status: Active » Needs review
StatusFileSize
new3.29 KB

What about something like this?

sun’s picture

+++ modules/simpletest/tests/menu_test.module	2009-12-04 09:20:11 +0000
@@ -58,6 +58,14 @@ function menu_test_menu() {
+    'title' => '<span>test</span>',
+    PASS_THROUGH => TRUE,

Hmm. If we add a new property, why don't we use 'title option' => PASS_THROUGH or similar?

Although I can see the same problem happening with code like added in the test, the original bug report was rather about

array(
  'title callback' => 'menu_test_title',
  'title arguments' => array(1),
)

function menu_test_title($nid) {
  $node = node_load($nid);
  return t('Stuff for %title', array('%title' => $node->title));
}

This review is powered by Dreditor.

chx’s picture

StatusFileSize
new3.31 KB

Whether we use title options or not is up for discussion. I have amended the patch to support any title callback not just t.

Status: Needs review » Needs work

The last submitted patch failed testing.

chx’s picture

Status: Needs work » Needs review
StatusFileSize
new3.32 KB
pwolanin’s picture

I'd rather see more information in callback arguments - putting a leading "-" in the callback name just seems very unintuitive and odd.

sun’s picture

As the original post explains, my first consideration and assumption was:

"oh, right, I probably need to specify 'options' => array('html' => TRUE) for the menu router item in hook_menu()..."

Which didn't work. But, would that be a feasible way? I think it would be the most logical approach, since we're basically in the domain of menu links here.

pwolanin’s picture

I think in a sense we can alrady do that. Perhaps the problem really lies in this function:
http://api.drupal.org/api/function/_menu_item_localize/7

Some links are getting passed through a callback - but not all, plus the fact that we are later calling check_plain() on everything for the page title. Perhaps we should assume that any callback makes the text safe, and we should call check_plain in any case where there is not a callback?

chx’s picture

Note that the definition does not use - in the callback name it's only an internal trick.

Freso’s picture

#8: title_pass.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, title_pass.patch, failed testing.

tanoshimi’s picture

Apologies for jumping in on this thread, but it looks like this might relate to my question posed at: http://drupal.org/node/725524

_menu_item_localize is responsible for translation of both title and description of a menu item, but looking through http://api.drupal.org/api/function/_menu_item_localize/7 , it seems that there is different functionality provided for each, namely:
- Menu titles can specify a custom 'title callback', and that callback (or the default callback, t()) can receive additional 'title arguments'.
- Menu item descriptions, however, always only use t(), and cannot have additional parameters supplied.

This discrepancy seems like a regression too, since previously it was possible to provide inline arguments to both menu item titles and descriptions, such as this:

$items['menuitem1'] = array(
    'title' => t('@module management', array('@module' => MODULE_NAME)),
    'description' => t('View @module configuration', array('@module' => MODULE_NAME)),
    ...

So, is there a case for adding a 'description callback' and 'description arguments' to menu items as well? Should I file that as a new regression bug report? (Sorry, I've not done much to drupal core before... trying to follow protocol!)

dmitrig01’s picture

Status: Needs work » Needs review
StatusFileSize
new4.18 KB

That's a feature. We're focused only on this bug here.

Here's a reroll. Not sure how useful this is.

Status: Needs review » Needs work

The last submitted patch, title_pass_2.patch, failed testing.

berdir’s picture

StatusFileSize
new3.95 KB

Re-roll, #16 was just missing the setUp() call to enable menu_test.module.

Not sure if I like the approach, using a constant as a key in hook_menu() is uncommon, all other keys are just strings. Also, the - trick seems quite hacky but I can't provide a better solution.

berdir’s picture

Status: Needs work » Needs review
pwolanin’s picture

StatusFileSize
new1.05 KB

As above, I don't think that's the right approach. I'd do something more like this.

Needs a test or two.

Status: Needs review » Needs work

The last submitted patch, title_pass_556910-20.patch, failed testing.

pwolanin’s picture

Status: Needs work » Needs review
StatusFileSize
new3.3 KB

Added test changes, and changed path.inc

Status: Needs review » Needs work

The last submitted patch, title_pass_556910-22.patch, failed testing.

pwolanin’s picture

Status: Needs work » Needs review

#22: title_pass_556910-22.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, title_pass_556910-22.patch, failed testing.

berdir’s picture

I think those DBLog tests happen to fail sometimes... let's try again.

Edit: Oh, pwolanin already tried that. Maybe not then :)

berdir’s picture

Status: Needs work » Needs review

#22: title_pass_556910-22.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, title_pass_556910-22.patch, failed testing.

Scott Reynolds’s picture

StatusFileSize
new3.74 KB

Ok fixed the tests. Couldn't repeat the file failures but the db log I did. Little scary how this works properly. I haven't figured out why this passes but it does.

Scott Reynolds’s picture

Status: Needs work » Needs review

Test bot please test.

chx’s picture

Status: Needs review » Reviewed & tested by the community

This will never be too pretty but works.

sun’s picture

+++ includes/menu.inc
@@ -650,11 +650,10 @@ function _menu_item_localize(&$item, $map, $link_translate = FALSE) {
+    // Avoid calling check_plain again on l() function.  All title callbacks
+    // must return sanitized strings.
+    $item['localized_options']['html'] = TRUE;

um, did we actually double-check every 'title callback' in core so that this is actually the case and we're not introducing countless of security issues here?

Powered by Dreditor.

dawehner’s picture

Status: Needs work » Needs review
StatusFileSize
new5.76 KB

Fixed:
http://api.drupal.org/api/function/_aggregator_category_title/7
http://api.drupal.org/api/function/filter_admin_format_title/7
http://api.drupal.org/api/function/menu_overview_title/7
http://api.drupal.org/api/function/node_type_page_title/7
http://api.drupal.org/api/function/user_page_title/7

Can someone explain why

$ grep "node_page_title" . -rn
./modules/node/node.module:1990:function node_page_title($node) {

is not used somewhere? I guess this function needs to be check_plained, too.

Regarding field_ui_menu_title, its not translated for example in field_ui_field_overview_form

      'label' => array(
        '#markup' => check_plain($instance['label']),
      ),

Status: Needs review » Needs work

The last submitted patch, drupal_556910-29.patch, failed testing.

sun’s picture

tstoeckler’s picture

StatusFileSize
new7.41 KB

Straight re-roll. Will work on fixing the tests now.

tstoeckler’s picture

Status: Needs work » Needs review
StatusFileSize
new7.79 KB

Let's see what the bot says.

tstoeckler’s picture

Status: Needs work » Needs review

I just noticed that format_username() (which is called by user_page_title()) is used very inconsistently throughout core currently. Even though the documentation says it should be check_plain'ed, in a lot of places it's not. Bascially in this patch we have the choice of moving the check_plain into format_username() or into user_page_title(). I'm not really an expert on this, but from a practical standpoint in makes more sense to alleviate all security implications centrally (like in this patch) and deal with double check_plain'ing in a different issue, than keeping it the way it is and fixing all the security issues in a different issue. Doesn't really matter either way, though.

Status: Needs review » Needs work

The last submitted patch, drupal_556910-38.patch, failed testing.

catch’s picture

Status: Needs review » Needs work

format_username() is supposed to be used for non-html contexts - i.e. a plain text email, so I don't think it makes sense to check_plain() by default.

tstoeckler’s picture

tstoeckler’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, drupal_556910-41.patch, failed testing.

tstoeckler’s picture

StatusFileSize
new7.38 KB

Just for the reference: I have no clue, why the bot couldn't install. I tried installing manually and it worked fine.
Running the SimpleTests with the patch applied fixed almost all problems (my machine is too slow, for me to actually run them all, but I tested about 10% and of those 95% were green).

Rerolled patch for #41 (#42 was a crosspost). No other changes. It would be ridiculous if this one doesn't break, but setting to 'needs review' just for the fun of it.

tstoeckler’s picture

Status: Needs work » Needs review

...

chx’s picture

Status: Needs review » Reviewed & tested by the community

I think we agreed on the approach already and tests pass.

yesct’s picture

#45: drupal_556910-45.patch queued for re-testing.

webchick’s picture

Status: Reviewed & tested by the community » Needs work

Ugh. I really, really don't like this approach. This introduces a huge inconsistency into the API:

- When you call drupal_set_title('string'); it's automatically check_plain()ed for you. (a really great security improvement added in D7)
- When you define a menu title callback, you are now responsible for check_plain()ing it. (this was NOT the case in D6 (see menu_overview_title() for example), so we've just *lost* built-in security here.)
- Not to mention we're making API changes a bazillion years after code freeze, that have very strong security implications if they are not strictly followed.

Avoiding built-in security checks should be opt-in, IMO, same as it is when calling drupal_set_title() directly.

Let's discuss some other approaches.

naxoc’s picture

I am not sure I understand this bug. Is it that we want to allow html tags in the the titles - or is it that the placeholders dont work? I cant really replicate the placeholders not working, but I also may just not get the issue.

Using the example from http://api.drupal.org/api/function/node_page_edit/7 the placeholders work fine if I do something like this.

$items['node/%node/edit'] = array(
  'title callback' => 'node_page_edit_title_callback',
  'title arguments' => array(1),
  'page callback' => 'node_page_edit',
  'page arguments' => array(1),
  'access callback' => 'node_access',
  'access arguments' => array('update', 1),
  'theme callback' => '_node_custom_theme',
  'weight' => 0,
  'type' => MENU_LOCAL_TASK,
  'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
  'file' => 'node.pages.inc',
);

function node_page_edit_title_callback($node) {
  $type_name = node_type_get_name($node);
  return t('Edit @type @title', array('@type' => $type_name, '@title' => $node->title));
}

Is it the html-tag/placeholder mix-in we want or can someone clarify? I removed the em-tags - they will be checkplained, but placeholders work.

sun’s picture

Status: Needs work » Needs review

I think the resolution chosen in this patch is the right one, and just because there has been some built-in security -- which actually is the cause for this entire bug -- does not mean it was right.

I also do not see that much of a relationship between drupal_set_title($unsafe_string) and return $safe_string in technically unrelated locations.

Technically, I'd say that it's instead correct to demand from menu title callbacks to return properly sanitized strings, as those strings are intended to be output. You have to sanitize everything else you want to return for output, so this is just consistent. The fact that drupal_set_title() automatically performs sanitation of the passed in string is definitely not something we should advance on. It's a constant source of problems and leads to developers making false assumptions about security.

webchick’s picture

Status: Needs review » Needs work

The fact that drupal_set_title() automatically performs sanitation of the passed in string is definitely not something we should advance on. It's a constant source of problems and leads to developers making false assumptions about security.

I disagree. Where developers consistently are Doing It Wrong (tm), I think it makes a lot of sense to make the defaults secure. We do this in lots of places, actually. drupal_set_title() in Drupal 7, theme variables, @ and % placeholders in t(). All of which were added for the very reason that people never remember to check_plain() their stuff, and the security team gets overloaded with XSS reports.

I support adding some sort of mechanism to opt-out of this automatic, default security, but I don't support regressing backwards to making it the developer's responsibility. Especially at this point in the release cycle.

pwolanin’s picture

I'm a bit torn here. title callback are way less common that drupal_set_title (though could that in part be due to this bug?).

As the instegator of the API change for drupal_set_title(), I'm much less bothered by requiring title callbacks to return safe text.

So, what so we have left? The hack chx suggests would work and avoids a schema change. Hell, we could even backport that to 6 if desired. It's ugly, but I guess only those peering into the innards of menu.inc would be offended.

dhthwy’s picture

To nitpick webchick's comment:

Where developers consistently are Doing It Wrong (tm)

In my most humble opinion, if a developer is consistently doing it wrong then there are much larger problems at play.

Security is great, but this is security that takes away needed functionality. If the consensus is the approach taken in this patch is the right way to do it, then any other approach will likely be a hack or just plain WTF. Any fix should solve the problem at its root which it looks like this patch does.

In any case, the bottom line to me is that sometimes you have to sacrifice some security for usability and functionality. Security gets sacrified all the time on the internet, if that weren't true, there would be no internet, as no one would run web servers or any other service because any service is a security risk. There is no such thing as a 100% secure service. And there are so many different ways a Drupal developer can open up their code to vulnerabilities if they don't learn to follow best security practices.

It looks to me like webchick doesn't think this issue is important enough to sacrifice any security, so this should just be a won't fix instead of some ugly hack that someone might *eventually* (who wants to write an ugly hack?) conjure up.

sun’s picture

re @pwolanin #53:

title callback are way less common that drupal_set_title (though could that in part be due to this bug?)

I can definitely confirm that assumption - I've worked on a couple of contributed modules that would like to use a title callback, but are not able to do so because of this bug. AFAIK, even Drupal core cannot use title callbacks in a few locations.

The bug could not be fixed during D6, but it would still be possible and a good decision to fix it now.

chx’s picture

Status: Needs work » Needs review
StatusFileSize
new10.53 KB

This is the clean solution and we agreed with webchick that security trumps API and schema changes. Note that the API change is permissive: everything works as it did before but if you add a passthrough now you get new behaviour.

Status: Needs review » Needs work

The last submitted patch, menu_passthrough.patch, failed testing.

chx’s picture

Status: Needs work » Needs review
StatusFileSize
new10.99 KB

There is a fake entry for the home page in the active trail and that had no passthrough defined.

chx’s picture

StatusFileSize
new10.93 KB

And with less debug.

Status: Needs review » Needs work

The last submitted patch, menu_passthrough.patch, failed testing.

chx’s picture

Status: Needs work » Needs review

#59: menu_passthrough.patch queued for re-testing.

dhthwy’s picture

Status: Needs review » Reviewed & tested by the community

Probably not the right person to RTBC but here goes anyway.

dries’s picture

Personally I think 'passthrough' is a terrible variable name. Passthrough what?

What about calling it 'escape' or something?

pwolanin’s picture

see: http://api.drupal.org/api/function/drupal_set_title/7

I suggested to chx in IRC that the element/column be named something like 'title_output', and that we use the same 2 constants we defined for drupal_set_title, which are CHECK_PLAIN and PASS_THROUGH.

sun’s picture

Status: Reviewed & tested by the community » Needs review

If we go with this approach, then I'd like to re-reference and restate the original/opening post and #10, i.e., the very first logical assumption that crossed my mind when I tried to make it work without looking up the code:

I probably need to specify

  'options' => array('html' => TRUE),

for the menu router item in hook_menu()...

Technically, this would also open up other possibilities (no comment).

--

While I'm ok with the proposed solution, I want to point out that there's hook_menu_alter(), and 'title callback' of module A may be replaced with an override by module B, and module A may change over time, requiring to set whatever option we conclude on here, but effectively making the combination of module A and module B insecure - a security interdependency that is very hard to track. Only if the title callback would return an array ('title', FALSE) or something, the reponsible title callback would be responsible for setting proper escaping options.

pwolanin’s picture

@sun - I'm not sure the options array makes sense in this context - since in many cases the title is not a link (not processed via l()).

chx’s picture

@sun also already you need to alter title/title callback/title arguments together, now we add title output.

chx’s picture

StatusFileSize
new23.78 KB

So this is how we can allow PASS_THROUGH.

chx’s picture

StatusFileSize
new11.34 KB

Erm, that's some patch mixup. Here's a better one.

pwolanin’s picture

In the schema would it make sense to write:

+        'default' => CHECK_PLAIN,
chx’s picture

StatusFileSize
new11.36 KB

It would.

sun’s picture

+++ modules/book/book.module	2010-08-15 06:47:51 +0000
@@ -1279,7 +1279,7 @@ function book_menu_subtree_data($link) {
-      $query->fields('m', array('load_functions', 'to_arg_functions', 'access_callback', 'access_arguments', 'page_callback', 'page_arguments', 'delivery_callback', 'title', 'title_callback', 'title_arguments', 'type'));
+      $query->fields('m', array('load_functions', 'to_arg_functions', 'access_callback', 'access_arguments', 'page_callback', 'page_arguments', 'delivery_callback', 'title', 'title_callback', 'title_arguments', 'title_output', 'type'));

It would be really nice if those were defined once for all and could be retrieved through a helper function menu_router_columns($optional_column_prefix)

Elsewhere in core, we're already using a nasty Schema API trick to retrieve all columns from the schema, sometimes skipping the 'weight' column (clashes with ml.weight).

menu_router_columns($optional_column_prefix = 'm', $exclude = array())

would just be lovely.

Aside from that, RTBC.

Powered by Dreditor.

chx’s picture

That's a followup issue isnt it?

pwolanin’s picture

Status: Needs review » Reviewed & tested by the community

Yes, I don't think this patch needs to add such a helper function - though I agree it would make the code nicer throughout menu.inc.

dries’s picture

Status: Reviewed & tested by the community » Needs review

I looked at this patch and while the code is easy to understand and follow, it is a big ugly and, as webchick explained, inconsistent.

I'd like to better understand the use case. We didn't have this in Drupal 6, and as far as I can tell, we did fine without it. Menu titles can also overwritten by drupal_set_title(), and we have the option of using menu title callbacks (i.e. 'title callback' option in hook_menu()).

In other words, I'd like to better understand why this is a critical bugfix versus a feature request. I might be missing something but this looks like it actually might be a non-critical feature request. I'm setting this back to 'needs review' so we can discuss the critical use cases a bit more as that would help me, and other reviewers, understand the issue better.

chx’s picture

Well, webchick review's was for another approach. this patch defaults to CHECK_PLAIN. Also, no matter what you do with a title callback you still will be check_plain'd in D6 and HEAD: $title = check_plain(menu_get_active_title()) in drupal_get_title. As for inconsistent, rather it becomes more consistent with the new argument of drupal_get_title -- it even reuses the same constants.

Why critical, it's a regression from D5, and a long standing one because we did not fix this in D6.

sun’s picture

Status: Needs review » Reviewed & tested by the community

- webchick's main concern against this patch has been resolved in the meantime.

- #1 (also by webchick) applies, this is still a regression from D5. There are actually a couple of places in core + many contrib modules where we'd like to use t('Edit %title', ...), but currently cannot, because the %-placeholder would be double-escaped. This forces page callbacks to manually invoke drupal_set_title(), although manually overriding the page title should be rarely needed.

dries’s picture

Status: Reviewed & tested by the community » Needs work

This forces page callbacks to manually invoke drupal_set_title(), although manually overriding the page title should be rarely needed.

Calling drupal_set_title() from a page callback is not a crime, as far as I'm concerned, and adding 'title_option' to the menu system is a bit ugly and less transparent.

It would be good to see what page callbacks we'd change. Let's include some conversions in this patch, please. This will provide reviewers some actual real-world examples.

Based on chx's and sun's response, this sounds like a 'major' issue at most, and certainly not a 'critical' issue. I'll wait with demoting this patch for now so we can discuss it some more.

pwolanin’s picture

trying to do a couple example conversions locally, but getting an unexpected warning for node/add/X
# Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1500 of /Users/Shared/www/drupal-7/includes/bootstrap.inc).

@@ -1870,7 +1870,9 @@ function node_menu() {
     $type_url_str = str_replace('_', '-', $type->type);
     $items['node/add/' . $type_url_str] = array(
       'title' => $type->name,
-      'title callback' => 'check_plain',
+      'title callback' => 't',
+      'title arguments' => array('Create @name', array('@name' => $type->name)),
+      'title output' => PASS_THROUGH,
       'page callback' => 'node_add',
       'page arguments' => array(2),
       'access callback' => 'node_access',
moshe weitzman’s picture

Relying on drupal_set_title() during the page callback will give incorrect titles in Shortcut module AFAIK.

moshe weitzman’s picture

Priority: Critical » Major

Downgrade as per Dries in #79

sun’s picture

Status: Needs work » Needs review
StatusFileSize
new43.52 KB

Attached patch converts most page callbacks to use proper title callbacks.

However, after doing this, I realized that we still need to "disable" title callbacks for local tasks, which should always use 'title' only. Dynamic or conditionally changing local task titles can be achieved via http://api.drupal.org/api/function/hook_menu_local_tasks_alter/7, but are fairly uncommon either way. (Comment module containing the only code I've ever seen with regard to local tasks.)

Thus, this patch works, but requires to fix titles of local tasks (make them statically use 'title' only), which we've discussed months ago already.

Status: Needs review » Needs work

The last submitted patch, drupal.menu-title-passthrough.83.patch, failed testing.

sun.core’s picture

This issue is a real problem for modules like Shortcut and others that are trying to present menu links with a human-readable meaning without having a menu tree at hand. We have a technically ready patch, but the actual conversion of (un)certain router items seems to trigger failing tests.

chx’s picture

Version: 7.x-dev » 8.x-dev
sun’s picture

Category: bug » task
Zgear’s picture

Assigned: Unassigned » Zgear
Issue tags: +Needs issue summary update

I'm going to make an issue summary first, once I have a clear insight on this issue I believe I shall tackle it :)

Zgear’s picture

Ok I believe that it needs more work but it will have to do for now.

Zgear’s picture

Issue summary: View changes

Updating Issue summary with details from comments

Zgear’s picture

Issue summary: View changes

Updated issue summary.

ZenDoodles’s picture

Well done on the issue summary micnap.

ZenDoodles’s picture

Assigned: Zgear » ZenDoodles
Status: Needs work » Needs review
StatusFileSize
new5.52 KB
new2.87 KB
new537 bytes
new27.54 KB

Reroll for D8...

Well, a start anyway. Also attached the .rej files I did not get finished yet in case I don't get back to it in time.

Might as well get the failing tests out of the way too, but should go back to needs work when the bot is done with it.

Status: Needs review » Needs work

The last submitted patch, 556910-Menu_router-91.patch, failed testing.

tim.plunkett’s picture

Title: Regression: Menu router items: Allow to pass PASS_THROUGH to t() » Menu router items: Allow to pass PASS_THROUGH to t()
Category: task » feature

This isn't a true regression if it wasn't in either of the two current releases of Drupal.

tim.plunkett’s picture

This tries to do a lot in one patch, how about just making the fix and one test usecase of it, the individual conversions are what keep breaking the patch, and they could be done elsewhere.

yesct’s picture

Issue tags: +Novice

might be novice to do #94

heddn’s picture

This might be more of a novice task if I could tell what was part of just making the fix and what was part of the conversion work.

yesct’s picture

Assigned: ZenDoodles » Unassigned

@ZenDoodles seemed like this might be up for grabs. :) unassigning it.

yesct’s picture

Issue summary: View changes

Assigment from Core Office Hours.

Yaron Tal’s picture

Issue is probably not novice anymore.
patch is way to old to apply, hook_menu and drupal_get_title() no longer exist.
Also this might be possible somehow now, because Drupal\Core\Controller\TitleResolver::getTitle() has some code in there that supports variables in page titles.

dawehner’s picture

Status: Needs work » Fixed

Menu router items don't support %-style or @-style placeholders for custom title callbacks using t(). Thus check_plain()ed is always used. This doesn't support the kind of functionality needed.

This is not true any longer, the title resolver actually has support for it now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.