Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
See #2566503: [meta] Replace remaining !placeholder for Non-URL HTML outputs only
https://www.drupal.org/node/2566503#comment-10329861
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#17 | interdiff.txt | 1.17 KB | lauriii |
#17 | replace_remaining-2569293-17.patch | 3.15 KB | lauriii |
#12 | replace_remaining-2569293-12.patch | 3.08 KB | lauriii |
#12 | replace_remaining-2569293-12-test-only.patch | 2.5 KB | lauriii |
#3 | replace_remaining-2569293-3.patch | 597 bytes | lauriii |
Comments
Comment #2
alexpottComment #3
lauriiiThere is only one usage which is:
. Triggering the tests to see what happens..
Comment #4
dawehnerSo yeah I think its totally fine at that point to assume that $title is either as SafeString object OR we deal with an unescaped string.
Comment #5
alexpottDoes anyone know what the dickens this is doing here? It seems very strange to have this in a generic render element.
Comment #6
alexpottIt's not part of theme_table in Drupal 7.
Comment #7
alexpottIn was introduced in #80855: Add element #type table and merge tableselect/tabledrag into it with no apparent tests. Weird.
Comment #8
dawehner@alexpott
To be clear, merging tableselect into #type table feels wrong, well, this is history.
Some lines higher you see
if ($row['selected'])
so this is how we know that something changed magically on tableselect. Its incredible how complex it is to figure out the proper title.Comment #9
dawehnerSo I think removing that behaviour would be out of scope of the issue. Is there anything you think we can do about it?
Comment #10
alexpott@dawehner given you've done the work perhaps a comment would help. I think
@
is correct because auto-escape but it would be awesome to have a test.Comment #11
lauriiiWorking on the test case
Comment #12
lauriiiComment #13
dawehnerWorks for me
Comment #16
alexpottLet's use $this->t() here... something like
$this->t('My favourite fruit is <strong>@fruit</strong>', ['@fruit' => 'bananas'])
Comment #17
lauriiiComment #18
dawehnerYeah its indeed better if we are more similar to the actual reality.
Comment #19
alexpottThis is part of the critical meta.
Comment #20
alexpottCommitted 55118ad and pushed to 8.0.x. Thanks!
Fixed on commit.