Problem/Motivation

NameFormatter.php
Lines 232-232

      $summary[] = $this->t('Format: <strong>Missing format.</strong><br/>This field will be displayed using the Default format.');

(Also lines 249 and 277.)

Impact: No XSS — strings are fully static — but Drupal discourages embedding HTML in translatable strings because translators can break the markup. A purely stylistic / coding-standards concern.

Steps to reproduce

Proposed resolution

Pass the markup via a placeholder, e.g. '@missing' => new FormattableMarkup('Missing format.', []), or drop the inline HTML.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork name-3586337

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bluegeek9 created an issue. See original summary.

bluegeek9’s picture

Assigned: Unassigned » bluegeek9

  • bluegeek9 committed 3af37478 on 8.x-1.x
    feat: #3586337 Raw HTML inside t() strings in formatter summary
    
bluegeek9’s picture

Assigned: bluegeek9 » Unassigned
Status: Active » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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