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.
Problem/Motivation
API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Component%21Util...
> array $html_tags: An array of HTML tags.
That's nice. What are they for?
Steps to reproduce
Proposed resolution
- Change the comment to "An array of allowed html tags"
- Change the parameter name to
$allowed_html_tags
Remaining tasks
Review patch
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#48 | diff-23-36.txt | 1.11 KB | quietone |
#36 | 2800691-36.patch | 1.98 KB | bharath-kondeti |
| |||
#31 | 2800691-30.patch | 2 KB | bharath-kondeti |
| |||
#23 | interdiff_19_23.txt | 497 bytes | Rishabh Vishwakarma |
#23 | 2800691-23.patch | 1.99 KB | Rishabh Vishwakarma |
|
Issue fork drupal-2800691
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:
Comments
Comment #2
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedComment #3
shashikant_chauhan CreditAttribution: shashikant_chauhan as a volunteer and at Iksula commentedAdding patch.
Comment #4
Chi CreditAttribution: Chi commentedWe can make step further and rename the parameter to $allowable_tags (same as in strip_tags PHP function).
Comment #14
quietone CreditAttribution: quietone commentedDiscussed this issue at a documentation triage meeting, myself and ambermatz were present. We agreed to un-assign this since it has not been worked on since 2016, that this is a task, that "An array of allowed html tags" is preferred. I have updated the IS.
Comment #15
Amber Himes MatzI like the idea of changing the variable name to
$allowable_tags
as suggested in #4.Comment #16
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedMade changes as per comment #14.
I think we could also use
$allowable_html_tags
instead of$allowable_tags
.Comment #18
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge require as a guide.
Think a good middle ground would be to use allowable_html_tags per #16.
If someone could make the quick change. I can mark it.
Comment #19
djsagar CreditAttribution: djsagar at OpenSense Labs commentedTried to address the changes mentioned in #18.
Changed only for first method.
Comment #20
djsagar CreditAttribution: djsagar at OpenSense Labs commentedComment #21
smustgrave CreditAttribution: smustgrave at Mobomo commentedThanks!
Comment #22
quietone CreditAttribution: quietone at PreviousNext commentedThe value can also be Null, so "array|null". But I believe the array is a sting array, if that is correct, this is then "string[]|null"
Comment #23
Rishabh Vishwakarma CreditAttribution: Rishabh Vishwakarma at OpenSense Labs for DrupalFit commentedUpdated the patch as per #23
Comment #24
smustgrave CreditAttribution: smustgrave at Mobomo commentedThanks
Comment #26
smustgrave CreditAttribution: smustgrave at Mobomo commentedRandom
Comment #27
sahil.goyal CreditAttribution: sahil.goyal as a volunteer and at Srijan | A Material+ Company for Drupal India Association commentedUpdate the #23 try to resolve the assertion failure.
Comment #28
smustgrave CreditAttribution: smustgrave at Mobomo commented27 was not needed as the failure in 23 was random
Comment #29
catch#23 looks good but no longer applies.
Comment #31
bharath-kondeti CreditAttribution: bharath-kondeti as a volunteer and at Specbee commented#23 was not applying. I have tried creating a new patch. It works for me, please review the same.
Comment #33
bharath-kondeti CreditAttribution: bharath-kondeti as a volunteer and at Specbee commentedRaised an MR for the same https://git.drupalcode.org/project/drupal/-/merge_requests/3946
Comment #34
FeyP CreditAttribution: FeyP as a volunteer and at werk21 commentedThis issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge require as a guide.
LGTM, but needs an issue summary update in proposed resolution and remaining tasks. Tagging for that.
I also wonder, since we now use "allowable" in the variable name, shouldn't we also use "allowable" in the parameter description instead of "allowed"? But I'm not a native speaker, so I'm not really sure about that one. Also, as a non-native speaker, I had to look up "allowable" in a dictionary whereas I knew what "allowed" was, even though I think my English is not that bad actually. But that's just me. After having done that, I agree that it is probably the more accurate term to use, though.
Comment #35
smustgrave CreditAttribution: smustgrave at Mobomo commentedI think allowed_html_tags reads better.
Comment #36
bharath-kondeti CreditAttribution: bharath-kondeti as a volunteer and at Specbee commentedUpdated the patch as per #34 and #35
Comment #37
FeyP CreditAttribution: FeyP as a volunteer and at werk21 commentedThanks. Let's update the issue status to "Needs review" so that the tests will run.
Comment #38
FeyP CreditAttribution: FeyP as a volunteer and at werk21 commentedUpdated the IS.
Comment #39
FeyP CreditAttribution: FeyP as a volunteer and at werk21 commentedThis issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
Thanks. The code looks good, #34 and #35 are addressed, the tests pass. I also tested the patch manually on 10.1.x-dev. I think this is RTBC.
Comment #41
smustgrave CreditAttribution: smustgrave at Mobomo commentedRandom
Comment #42
BramDriesenTriggered a re-test.
@smustgrave You know there is a typo in your issue template? :-) #need-reveiw-queue (reveiw -> review)
Comment #45
FeyP CreditAttribution: FeyP as a volunteer and at werk21 commentedAnother random test failure, retest was green, see #3361121: [random test failure] InstallerExistingConfig[SyncDirectory]MultilingualTest::testConfigSync, back to RTBC per #39.
Comment #47
BramDriesenTriggered retest
Comment #48
quietone CreditAttribution: quietone at PreviousNext commentedTriaging the RTBC queue.
Thank you @FeyP, for asking for an Issue Summary update. That helps a great deal!
I see that catch thought the patch in #23 was good and after that it was rerolling. It is confusing when there is both a patch workflow and an MR on issue. :-( It looks like the patch in #36 is the one to use. However, there are no interdiffs for that or the previous patch. I have added one.
All the issues have been addressed and this is good to go. I have updated credit, including myself and @Amber Himes Matz due to the triage work done in a documentation meeting.
@bharath-kondeti, Thanks for helping on this issue. To help reviewers always add an interdiff, or a diff, whichever is appropriate. There are instructions for creating an interdiff.
Comment #49
longwave"HTML" in the comment should be in upper case.
Comment #50
BramDriesenComment #51
smustgrave CreditAttribution: smustgrave at Mobomo commentedComment #54
longwavePaused to consider the backport here; while this is largely just a docs fix, we are also renaming a variable, and if someone is using named arguments this will break their code. But I think the chances of anyone actually using named arguments here is slim, and so I opted for the backport to keep the branches in sync and improve documentation for 10.1.x users.
Committed and pushed 8624038a9a to 11.x and 02c6babe8b to 10.1.x. Thanks!