Last modified: 2012-03-07 20:48:12 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T37013, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 35013 - Sanitizer:removeHTMLtags failure: it removes XHMTL style <img src=... /> tags when allowing this tag expressly
Sanitizer:removeHTMLtags failure: it removes XHMTL style <img src=... /> tags...
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.20.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 34763 35002
  Show dependency treegraph
 
Reported: 2012-03-06 22:28 UTC by T. Gries
Modified: 2012-03-07 20:48 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description T. Gries 2012-03-06 22:28:07 UTC
When allowing <img> tags by using 

$string = Sanitizer:removeHTMLtags( $string, null, array(), array( "img" ) );

this fails:

Sanitizer htmlescapes the _closed_ img tag even when I say by using the allowed tag array( "img" ) that I want allow it and the tag should not be escaped.

Can parser and sanitizer experts please have look into this singular problem and repair it ?
Comment 1 T. Gries 2012-03-07 20:48:12 UTC
It appears that I made a mistake in my numerous tests: a constructed "a" link in "img"-tag preceeding context was not properly closed. This then broke the rest ...

End of that story, and good news:

Sanitizer:removeHTMLtags appears to work as designed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links