With a theme whose name as defined in the theme info file contains an & character, say "Foo & bar", the menu items that use this theme name are:
- theme settings: "Foo & bar" (which is correct)
- block settings: "Foo & bar" (that's "Foo AMPERSANDampSEMICOLON bar', just to be clear -- it's getting escaped twice).

It looks like block_menu() is causing this when building its menu items:

      'title' => check_plain($theme->info['name']),

Comments

jody lynn’s picture

Status: Active » Needs review
StatusFileSize
new1.14 KB

Comparing system_menu and block_menu shows that block_menu uses check_plain for $theme->info['name'] and system_menu does not. Check_plain should not be used for menu item titles, and in fact block_menu is the only core module that is doing this.

daniel korte’s picture

Issue summary: View changes
StatusFileSize
new1.96 KB

The help link for "Demonstrate block regions (THEME)" is also double escaped. I re-rolled the patch to include that instance.

balagan’s picture

I have run into this issue too. I confirm that applying the patch fixes it.
A screenshot after applying the patch, and one for the demonstration page.

balagan’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: double-escaped-theme-name-413270-2.patch, failed testing.

balagan’s picture

Status: Needs work » Needs review

balagan’s picture

Status: Needs review » Reviewed & tested by the community

Test succeeds, so back to RTBC as before.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 2: double-escaped-theme-name-413270-2.patch, failed testing.

dcam’s picture

Status: Needs work » Reviewed & tested by the community
David_Rothstein’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +7.36 release notes

Looks good. I should have committed this earlier in the release cycle due to the string change, but I missed that this patch contained one. Going to commit it anyway since the string change is very minor and very-admin-facing; the impact on translations should be minimal.

Also looks like none of this is needed in Drupal 8 due to the double-escaping prevention Drupal 8 has elsewhere.

Committed to 7.x - thanks!

  • David_Rothstein committed 0a9d531 on 7.x
    Issue #413270 by Jody Lynn, Daniel Korte: Block settings for theme menu...

Status: Fixed » Closed (fixed)

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