Follow-up to #2042143: [META] Fix unsafe core translatable strings
Problem/Motivation
In the contextual.module file there is one string not passing the locale_string_is_safe test because of the usage of an <img> tag.
Allowed in beta?
Allowed since this only changes translatable string.
https://www.drupal.org/core/beta-changes
Proposed resolution
Use a placeholder.
User interface changes
This patch should not introduce any change in the UI.
Steps to reproduce:
- Install Drupal
- Enable Help module
- Enable Contextual module
- Go to admin/help/contextual
Before:

After:

| Comment | File | Size | Author |
|---|---|---|---|
| #3 | contextual_after.png | 53.64 KB | duaelfr |
| #3 | contextual_before.png | 53.42 KB | duaelfr |
| #1 | contextual-fix_unsafe_for_translation_string-2371457-1.patch | 1.92 KB | duaelfr |
Comments
Comment #1
duaelfrHere is the patch.
Comment #2
duaelfrSorry for the title. I cloned the meta issue too qhickly ;)
Comment #3
duaelfrComment #4
yesct commentedthis looks good to me.
Comment #5
duaelfrSeen with Cathy. Diffed the HTML code to be sure there was no difference.
Before:
<li>Hovering over the area of interest will temporarily make the contextual links button visible (which looks like a pencil in most themes, and is normally displayed in the upper right corner of the area). The icon typically looks like this: <img src="http://d8test/core/misc/icons/bebebe/pencil.svg" alt="contextual links button" /></li>After:
<li>Hovering over the area of interest will temporarily make the contextual links button visible (which looks like a pencil in most themes, and is normally displayed in the upper right corner of the area). The icon typically looks like this: <img src="http://d8test/core/misc/icons/bebebe/pencil.svg" alt="contextual links button" /></li>Result: no difference.
Comment #6
yesct commentedComment #7
duaelfrThank you Cathy.
Comment #8
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 2fd9949 and pushed to 8.0.x. Thanks!