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.
Part of #2545972: Remove all code usages SafeMarkup::checkPlain() and rely more on Twig autoescaping
Problem/Motivation
SafeMarkup::checkPlain()
is unnecessary.
Proposed resolution
Remove usage from titleQuery - auto escape will do it for us.
Remaining tasks
Do it
Review
Commit
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
#10 | interdiff.txt | 485 bytes | lauriii |
#10 | remove_all_usages-2560751-10.patch | 8.28 KB | lauriii |
#8 | interdiff.txt | 1.04 KB | lauriii |
#8 | remove_all_usages-2560751-8.patch | 8.28 KB | lauriii |
#7 | interdiff.txt | 510 bytes | lauriii |
Comments
Comment #2
alexpottComment #3
alexpottWow RolesRid is borken in 2 different ways... I think that should be put into a different patch and test coverage added.
To manually test:
blah/%
Comment #4
alexpottPostponing on #2560897: Drupal\user\Plugin\views\argument\RolesRid is very broken
Comment #5
alexpottComment #6
alexpottrebased... now that #2560897: Drupal\user\Plugin\views\argument\RolesRid is very broken has landed. That patch added a test using a role with markup in the title so now we have test coverage.
Comment #7
lauriiiThere was still one usage left. Otherwise everything seems to be fine
Comment #8
lauriii@alexpott spotted that one SafeMarkup::checkPlain() still existed. I also removed the bogus array_combine from StringArgument::titleQuery().
Comment #10
lauriiiThis one should pass
Comment #12
valthebaldI've searched for all occurences of titleQuery() after applying the #10 patch - none of them calls SafeMarkup::checkPlain() anymore
Comment #13
catchCommitted/pushed to 8.0.x, thanks!