Follow-up to #2571949: Remove !placeholder in link module

Problem/Motivation

See #2566503: [meta] Replace remaining !placeholder for Non-URL HTML outputs only

modules/locale/locale.bulk.inc:          $context['message'] = t('!message (@percent%).', array('!message' => $options['message'], '@percent' => (int) ($context['finished'] * 100)));

Proposed resolution

Remaining tasks

Agree that removing HTML support makes sense.

User interface changes

None

API changes

Date format strings no longer support adding HTML using the \ escape character.

Data model changes

None

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because at the moment date formats support HTML but it is escaped
Issue priority Major because part of the critical to remove !placeholder
Disruption Disruptive for existing sites that are adding HTML to date formats. If HTML is required in a formatted date then the site should implement a custom field formatter to do this.
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner created an issue. See original summary.

Sutharsan’s picture

Assigned: Unassigned » Sutharsan

Working on it.

Sutharsan’s picture

Assigned: Sutharsan » Unassigned
Issue summary: View changes
Status: Active » Needs review
FileSize
110.36 KB
68.76 KB
989 bytes

The message in t('@message (@percent%).', ...) comes from locale_translation_batch_fetch_import() and is the return value of t().

See attached screenshots that a custom translation with HTML is not escaped twice.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

It is perfect to fix it, in an ideal world we would have a test coverage to ensure that autoescaping doesn't happen.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed e34bb4a and pushed to 8.0.x. Thanks!

  • alexpott committed e34bb4a on 8.0.x
    Issue #2571951 by Sutharsan: Remove !placeholder in locale module
    

Status: Fixed » Needs work

The last submitted patch, 3: locale-placeholder-2571951-3.patch, failed testing.

nevergone’s picture

Status: Needs work » Fixed

Already committed.
Fixed.

Status: Fixed » Closed (fixed)

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