On admin/config/search/match_redirect/add, the help text for the "Pattern" setting goes like this, quote:

"Specify redirect sources by using their paths. Enter one path per line. The '*' character is a wildcard. Example paths are blog for the blog page and blog/* for every personal blog. is the front page."

For "Target", it's this:

"The path for redirect target. This can be an internal Drupal path or alias such as node/add or an external URL such as http://drupal.org. Enter to link to the front page."

Note how both include an explanation in the last sentence for how to deal with the front page but it doesn't appear. That's because the help text is not properly escaped. The relevant code is in match_redirect.admin.inc, in the '#description' items of the form specification, and tells us that it should indeed be <front>.

Possible solutions:
* Wrap the t() calls of '#description' items into check_plain(). Easy and should do the trick in this case.
* Use "@front" instead of "<front>" in the translated text, and pass "@front" => "<front>". See t() and format_string() documentation for reference. That way, if you decided to add a link in the help text later on, check_plain() wouldn't brute-force-escape your entire string.

Comments

drupalgideon’s picture

Duplicate of https://drupal.org/node/2101093 where I submitted a patch.

jpetso’s picture

Status: Active » Closed (duplicate)

Ah, true. Closing as duplicate, sorry.