API page: https://api.drupal.org/api/drupal/includes%21common.inc/group/sanitizati...

Enter a descriptive title (above) relating to Sanitization functions, then describe the problem you have found:

List of Sanitization functions contains 'filter_xss' twice - ie 2 identical, adjacent entries.

Comments

jhodgdon’s picture

Version: 7.x-dev » 8.x-dev
Issue tags: +Novice, +Needs backport to D7

That's interesting. It's also true in 8.x.

I was going to say it was an API module bug, but the reason it is happening is that in common.inc there is a line saying

@defgroup sanitization
@{

and filter_xss occurs in the file before the @} but it also has @ingroup sanitization in its documentation header. So it is basically being added to the Sanitization topic twice.

So we should remove the @ingroup line from filter_xss(). Seems like a good Novice project?

asrob’s picture

Hi!

I tried to fix this issue for Drupal 8 and 7, attached them as well.

asrob’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: filter_xss_duplicated_in_list-2216945-drupal7-2.patch, failed testing.

jhodgdon’s picture

Thanks for the patch!

In general, it's better to just work on one version at a time (so I'd just want to see an 8.x patch for now). See
https://drupal.org/node/1319154#multiple-versions
for an explanation.

So, just looking at the 8.x patch, can you also remove the extra blank line before the @ingroup, which is left over at the end after removing that line? Thanks!

asrob’s picture

Status: Needs work » Needs review
StatusFileSize
new510 bytes

First of all, I got it, thank you for the link! :)

I've fixed it. I hope this will be good.

miraj9093’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

jhodgdon’s picture

Perfect, thanks! I'll get that committed, and likely the same patch will work for D7 and D8.

jhodgdon’s picture

Version: 8.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed to 8.x, thanks!

I guess we do need a different patch for 7.x: didn't apply there with -p2 (many do; some don't).

asrob’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new502 bytes

Thank you!

I attached a patch for 7.x, I hope it will be good. :)

miraj9093’s picture

Status: Needs review » Reviewed & tested by the community

Looks Good to me..

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: filter_xss_duplicated_in_list-2216945-10.patch, failed testing.

David_Rothstein’s picture

Status: Needs work » Needs review
David_Rothstein’s picture

Status: Needs review » Reviewed & tested by the community

(Assuming that failure was a fluke given that this is a documentation patch...)

jhodgdon’s picture

Weird, I didn't know the testbot was having random failures on 7.x as well?

jhodgdon’s picture

Status: Reviewed & tested by the community » Fixed

Thanks again! Committed to 7.x.

Status: Fixed » Closed (fixed)

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