Page MenuHomePhabricator

Allow some HTML tags through to table of contents
Closed, ResolvedPublic

Description

Author: benjamin.ingberg

Description:
I recently edited the wikipedia article about heat death:
http://en.wikipedia.org/wiki/Heat_death_of_the_universe

The edit consisted of me changing all the 10<sup>xx</sup> into 10Exx in the headers. Because the
table of contents changed 10<sup>xx</sup> into 10xx (for example 10<sup>40</sup> looked like
1040).

I suppose the same could be said for subscripts but I haven't tried that.


Version: unspecified
Severity: enhancement

Details

Reference
bz8393

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:33 PM
bzimport set Reference to bz8393.

ayg wrote:

HTML tags are currently stripped. It would probably be sensible to make an
exception for <sup> and <sub>, maybe also <s>, <u>, and <del>/<ins>, but then
you start getting into issues of people setting weird styles and getting
non-blue or otherwise weird links. At least <sup> and <sub> should be
whitelisted, because those aren't too uncommon and stripping them results in
flat-out wrong output (e.g., 10^22 -> 1022).

ayg wrote:

Fixed in r25260 for <sup> and <sub>. I left alone behavior for other attributes.