Problem/Motivation
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Render%21...
The attribute description "(string, optional) A string containing the textual contents of the tag" does not tell the reader whether HTML escaping is performed. I'd prefer instead:
#value: (HTML string, optional) The markup content of the tag. No escaping is performed on output.
Steps to reproduce
Proposed resolution
See text in #25
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|
Issue fork drupal-3215627
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3215627-htmltag-doc-should
changes, plain diff MR !9138
Comments
Comment #2
cilefen commentedComment #3
pragati_kanade commentedComment #4
pragati_kanade commentedHi @mrclay
I created patch.Please review.
Comment #5
thiagorw commentedHi
I did the review the comment is as suggested on this Issue
Comment #6
cilefen commentedI think we need a space after periods.
Comment #7
thiagorw commentedI insert a space after periods.
Please review it.
Comment #8
pragati_kanade commentedI reviewed patch #7 It looks good to me.
Comment #9
larowlanThis is not accurate, if you look at ::preRenderHtmlTag you can see it does Xss::filterAdmin
Comment #10
rahulkhandelwal1990 commentedDescription updated in the new patch, please verify.
Comment #11
rahulkhandelwal1990 commentedComment #12
cilefen commentedI think it would make sense to mention
\Drupal\Component\Utility\Xss::filterAdmin()precisely. Also more clarity on "if it is not safe" is needed here. What does that actually mean?Comment #13
cilefen commentedI think that means "if it is not marked as a safe string".
Comment #14
varshith commentedUpdating it to me more clear based on similar comments found in core elsewhere.
Comment #15
varshith commentedComment #16
rahulkhandelwal1990 commented@varshith Please upload interdiff along with patch(in #14 it is missing), It will help to understand the changes you have done. See how to create interdiff here https://www.drupal.org/docs/develop/git/using-git-to-contribute-to-drupa...
Comment #17
varshith commented@rahulkhandelwal1990
I didn't add interdiff as this is a very small change. Adding it now.
Also updating patch to add grammatical fix.
Comment #20
ilgnerfagundes commentedPatch #17 works correctly and changes the description correctly. Changing status to rtbc
Comment #21
cilefen commentedThe sentence is missing a definite article. How about instead “This will be XSS admin filtered unless it is an object implementing MarkupInterface.”?
Please stop posting screenshots of code and diffs.
Comment #22
ilgnerfagundes commentedupdating patch
Comment #23
cilefen commentedComment #24
ankithashettyJust fixed custom command failure error in #22, thanks!
Comment #25
cilefen commented"#value: (string, optional) A string containing the textual contents of the tag." is actually wrong. That should probably be "#value: (string|MarkupInterface, optional) The textual contents of the tag. Strings will be XSS admin filtered."
Comment #26
guilhermevp commentedComment #27
guilhermevp commentedSending patch following @celifen suggestions.
Please review.
Comment #28
guilhermevp commentedComment #29
cilefen commentedThat’s close but it is slightly different.
Comment #35
quietone commentedLet's finish this one.
Comment #36
smustgrave commentedSeems straight forward enough.
Comment #42
longwaveBackported to 10.3.x as a docs only fix.
Committed and pushed 11996c7a16 to 11.x and 658f18f920 to 11.0.x and af2a2c5a14 to 10.4.x and 8069f0030a to 10.3.x. Thanks!