Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
documentation
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
24 May 2015 at 21:36 UTC
Updated:
22 Mar 2024 at 00:19 UTC
Jump to comment: Most recent
Comments
Comment #1
xjmComment #2
leslieg commenteda group of us are sprinting on this issue as part of NHDevDays2 D8 Accelerate sprint
Comment #3
yesct commentedI'm pretty sure https://www.drupal.org/core/issue-priority defines minor as typos. And this is more than that. So changing to normal.
Comment #4
xjmSee also #2280965-20: [meta] Remove every SafeMarkup::set() call about the reordering of the recommended replacements in the CR. Or here are notes on it from our planning meeting:
Comment #5
leslieg commentedEvaluated the following change records and updated as indicated:
1. https://www.drupal.org/node/2296163 - updated description to be clearer
2. https://www.drupal.org/node/2302363
3. https://www.drupal.org/node/2311123 - removed option 3, changed option 4 to option 2, added link to safemarkup class description located at https://www.drupal.org/node/2296163
4. https://www.drupal.org/node/2445441
https://www.drupal.org/node/2489900 is a draft change record that will possibly need to be combined once published
we will evaluate #2280965-20 again based on your recommendation
Comment #6
xjmThanks @leslieg! Marking for review.
Comment #7
xjmComment #8
xjmhttps://www.drupal.org/node/2311123 should be merged into the main change record in https://www.drupal.org/node/2296163, and should also mention that using render arrays is also a preferred option in contexts that support them, with
#markupused as a best practice for applying XSS admin filtering.Comment #9
xjmNotes from #2554889: Remove SafeMarkup::set() from the codebase:
Working on those two parts of it to start, and also on https://www.drupal.org/node/2549395.
Comment #10
xjmComment #11
xjmComment #12
xjmLots of CRs need to be checked over for the
checkPlain()deprecation as well. These should have gotten fixed before that patch went in probably, but we should definitely do so now:https://www.drupal.org/list-changes/published/drupal?keywords_descriptio...
https://www.drupal.org/list-changes/published/drupal?keywords_descriptio...
Also see:
Comment #13
xjmhttps://www.drupal.org/node/2392803 might also want an update; I believe render arrays are now supported for the link generator as well.
Comment #14
xjmUpdated: https://www.drupal.org/node/2457593/revisions/view/8302341/8838229
Comment #15
xjmAdded: https://www.drupal.org/node/2296163/revisions/view/8837793/8838257
And I'll update all of those to reference that.
Comment #16
xjmThis message is added to all the other CRs (copy-pastable for your future SafeMarkup changing fun!)
I also reduced the inline_template CR back to cover what it actually covers:
https://www.drupal.org/node/2311123/revisions/view/8828245/8838343
And began consolidating the concatenation strategies onto the main CR:
https://www.drupal.org/node/2296163/revisions/view/8838269/8838345
Comment #17
xjmFrom #2555473-32: Deprecate SafeMarkup::checkPlain() for Drupal 8.0.x:
Alright, @alexpott, @effulgentsia, and I reworked the main change record for the method removals in SafeMarkup methods are removed. There are still a couple outstanding things that I think should be improved (copying and expanding notes from our google docs draft):
This is clearer now, but as a reader of this I still would not entirely understand "is used in a template". First of all, there are ways to use strings unsafely in a template. Do we have a Twig resource we can reference about how output ends up in templates and how it is used safely? Secondly, there are many cases where a developer is creating output that will be used in an existing template without the developer knowing anything about it. (Maybe we need a chart somewhere indicating which strings will be escaped, which strings will be filtered, and which will not be sanitized. That doesn't need to block this though.)
We should clarify when they can't be removed. For example, if the string is XSS-filtered, this will be more permissive than escaping and bypass it because the resulting string will be safe.
This example is helpful. A code snippet might make it more so. However, some render array elements, like
#prefix,#suffix,#value, and#markupare not escaped (only admin filtered) so this sentence is somewhat too vague.Comment #31
quietone commentedI am all for improving documentation of all kinds but this is for change records for a now unsupported version of Drupal. There has been work here for 9 years as well. I suggest it would be better to focus our time on improving documentation and change records for supported versions. By this time, people are using internet searched to find support on these topics.
Although this was not 100% complete, I am going to close it as fixed to allow credit for those who worked on the change records. If you disagree with this decision, re-open and add a comment.
Thanks!