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:

  1. Install Drupal
  2. Enable Help module
  3. Enable Contextual module
  4. Go to admin/help/contextual

Before:

After:

Comments

duaelfr’s picture

Assigned: duaelfr » Unassigned
Status: Active » Needs review
StatusFileSize
new1.92 KB

Here is the patch.

duaelfr’s picture

Title: [META] Fix unsafe core's translatable strings » Replace inappropriate translatatable string in core/modules/contextual/contextual.module

Sorry for the title. I cloned the meta issue too qhickly ;)

duaelfr’s picture

Issue summary: View changes
StatusFileSize
new53.42 KB
new53.64 KB
yesct’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -D8MI-meta

this looks good to me.

duaelfr’s picture

Seen 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.

yesct’s picture

Issue summary: View changes
duaelfr’s picture

Thank you Cathy.

alexpott’s picture

Category: Task » Bug report
Status: Reviewed & tested by the community » Fixed

This 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!

  • alexpott committed 2fd9949 on 8.0.x
    Issue #2371457 by DuaelFr: Replace inappropriate translatatable string...

Status: Fixed » Closed (fixed)

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