Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 Feb 2015 at 02:32 UTC
Updated:
14 Mar 2015 at 11:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fabianx commentedThat is a good idea to do regardless of what else we do.
Do we need additional tests for this?
Else this would be RTBC from my side.
Comment #2
effulgentsia commentedHere's the test addition, but without the change to
String. The new test fails and I'm curious if there's any existing test to catch the double-escaping that would happen from the changes toinstall.core.incwithout the corresponding fix toString.Comment #4
effulgentsia commentedWell, not surprising that we don't have full test coverage of the installer. Ok, taking those hunks out then, and attempting some changes that are more interesting. This is still without
Stringchanges, so I hope some tests catch these double-escaping problems.Comment #6
effulgentsia commentedGreat. At least some RDF tests are catching the double-escaping bugs. So, here's the original changes to
Stringthat fixes them. This patch therefore now demonstrates the key benefit of the change, which is we can start using@even for variables that already contain rendered HTML.Comment #7
effulgentsia commentedSome docs improvements based on what I encountered today while working on this issue.
Comment #9
fabianx commentedNice work!
Comment #12
effulgentsia commentedWow. A test that fails based on just docs. Reworded the docs to not trigger that failure.
Comment #13
fabianx commentedLol, nice.
I re-reviewed the patch and this is RTBC.
The beta evaluation made me laugh :) - Yes, I really want to keep double-escaped text1111!!!!1111
j/k - Let's get this in.
Comment #14
amateescu commentedI think the changes in the twig files really show that this is a very nice idea/patch :) Since this is an area that is used a lot at runtime, are there any performance concerns for the switch from
String::checkPlain()toSafeMarkup::escape()?Just a very minor point here, "use" can go back up at the end of the previous line. Can be easily fixed on commit.
Comment #15
fabianx commented#14: One function call more overall, but if escaped already, saving the call to ::checkPlain().
So in the worst case one function call more, in the best case, saving the check_plain operation.
Comment #16
star-szrThis seems to make a lot of sense, thank you very much @effulgentsia!
Comment #17
alexpottNice. Committed b33a46b and pushed to 8.0.x. Thanks!
Thank you for adding the beta evaluation to issue summary.