Found in #2506445: Replace !placeholder with @placeholder in t() and format_string() for non-URLs in tests
Part of #2506427: [meta] !placeholder causes strings to be escaped and makes the sanitization API harder to understand.

core/modules/views_ui/src/Tests/DisplayTest.php uses !placeholder unnecessarily.

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Task, because its a child issue of a task
Issue priority Major, because its a child of a major

Comments

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new1.98 KB
dawehner’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
Issue tags: +Quickfix

Works for me.

xjm’s picture

Status: Reviewed & tested by the community » Needs review

Hmm, I'm still not sure about this one. I think the intent of the test is to ensure the '<test>' title is singly escaped but not double-escaped. assertFieldByXpath() makes no claims one way or the other about the escaping expectations, and I'm actually surprised these assertions pass.

Maybe we could help clarify this and make the test more robust by adding an additional pair of assertions: One asserting that there is no raw '<test'> and another asserting that there is no double escaping therof?

xjm’s picture

Status: Needs review » Needs work

Yeah, the more I think about it, the more I think we should add that.

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new1.31 KB
new2.26 KB

@xjm good point - this is exactly why #2560641: Remove all usages SafeMarkup::checkPlain() from render arrays made changes to assertTitle.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Nice idea!

  • xjm committed 958a47a on 8.0.x
    Issue #2568013 by alexpott, dawehner, xjm: Replace !placeholder in...
xjm’s picture

Status: Reviewed & tested by the community » Fixed

Go team! Committed and pushed to 8.0.x.

Status: Fixed » Closed (fixed)

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