Last modified: 2013-10-06 16:22:55 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 T42579, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 40579 - Update Sanitizer to support replacement of whole elements instead of just attributes.
Update Sanitizer to support replacement of whole elements instead of just att...
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: html 4557
  Show dependency treegraph
 
Reported: 2012-09-27 18:25 UTC by Daniel Friesen
Modified: 2013-10-06 16:22 UTC (History)
4 users (show)

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


Attachments

Description Daniel Friesen 2012-09-27 18:25:42 UTC
Currently our Sanitizer is only capable of sanitizing attributes. We cannot sanitize whole tags (besides just making them not work) so we can't clean up invalid elements like <center>, <font>, and <strike>.

We need to update our Sanitizer code so we can also substitute whole tags. And we'll need to make sure we also replace the closing tag.

This will probably mean creating a new set of functions to call, deprecating the old ones, and then fixing the parser to use the new functions. This involves whole element replacement so it might not be as trivial to do in the parser as attributes were.
Comment 1 Brion Vibber 2012-09-27 19:19:42 UTC
<center>, <font>, and <strike> work in existing browsers, there's no need to remove them.
Comment 2 Daniel Friesen 2012-09-27 19:23:08 UTC
(In reply to comment #1)
> <center>, <font>, and <strike> work in existing browsers, there's no need to
> remove them.

This is part of $wgCleanupPresentationalAttributes. Right now for a purely technical reason we transform attributes that were removed from HTML but not elements that were removed from html.
Comment 3 TMg 2012-09-28 11:25:55 UTC
(In reply to comment #1)
> <center>, <font>, and <strike> work in existing browsers, there's no need to
> remove them.

I'm telling them the same in bug #40329. They say they can not output "invalid" HTML. But they do. This is horribly confusing for all template developers. This is insane. You are welcome.
Comment 4 MZMcBride 2012-09-30 02:01:58 UTC
(In reply to comment #2)
> This is part of $wgCleanupPresentationalAttributes. Right now for a purely
> technical reason we transform attributes that were removed from HTML but not
> elements that were removed from html.

Right, I believe this is the wrong direction to be headed in. I've filed bug 40632 ("Kill $wgCleanupPresentationalAttributes from MediaWiki core").
Comment 5 Helder 2013-10-06 16:22:55 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > This is part of $wgCleanupPresentationalAttributes. Right now for a purely
> > technical reason we transform attributes that were removed from HTML but not
> > elements that were removed from html.
> 
> Right, I believe this is the wrong direction to be headed in. I've filed bug
> 40632 ("Kill $wgCleanupPresentationalAttributes from MediaWiki core").

The feature was removed, so I'm marking this as WONTFIX.

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


Navigation
Links