Page MenuHomePhabricator

Sanitizer strips more underscores from id's in $wgExperimentalHtmlIds mode
Closed, DeclinedPublic

Description

When HTML5 is on, id's with more than one underscore in a row are converted the way one underscore remains only.

More underscores in a row is perfectly valid id, so absolutely no need to strip them.

This behavior breaks CSS and JS depending on such id's.


Version: unspecified
Severity: major
URL: http://test.wikipedia.org/wiki/User:Danny_B./html5

Details

Reference
bz27733

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:24 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz27733.
bzimport added a subscriber: Unknown Object (MLST).

cc'ing Aryeh Gregor since (I believe) he did most of the $wgExperimentalHtmlIds stuff, he might know the rationale for stripping repeated underscores.

ayg wrote:

This is $wgExperimentalHtmlIds, not HTML5 per se. I've disabled that by default in r83061 because of all these complaints. Minimally, I could change it to not strip leading or trailing underscores and not collapse consecutive underscores; it seems like that would fix many of the complaints, at the expense of somewhat uglier id's.

What's some example CSS or JS that depends on such id's? It's not really possible to evaluate a request like this without specific problem reports.

MaxSem subscribed.

Per T167470, we're removing $wgExperimentalHtmlIds completely.