Add tracking category when editors use the deprecated self-closed tag hack.
authorC. Scott Ananian <cscott@cscott.net>
Wed, 4 May 2016 18:01:00 +0000 (14:01 -0400)
committerTim Starling <tstarling@wikimedia.org>
Tue, 12 Jul 2016 04:18:04 +0000 (14:18 +1000)
commit6cdae8051370b7e6641eaaeb438b889ddb510281
treea856bb9f6d96f0e3c4f5a2f372df72af0b4a8f15
parentcb506aecdfe6356b5a848858f1d6c04f6c7821f6
Add tracking category when editors use the deprecated self-closed tag hack.

Some pages use constructs like `<b/>` or `<span/>` to protect spaces or
special characters at the beginning/end of templates.  This syntax is
incompatible with HTML5 parsing rules, which dictate that these should
be treated as open tags, and instead rely on an unusual quirk of the
`tidy` program that removes invalid constructs.

This syntax is deprecated as part of the process of reconciling `tidy`
with modern HTML5 parsing semantics.  Authors can use `&#32;` or `<nowiki/>`
as valid replacements.

In order to provide time to transition existing content, pages using
self-closing tags in violation of the HTML5 parsing specification
will have their templates/pages added to a new tracking category.
After these uses are fixed, we will change the sanitizer to treat these
as normal open tags, to be consistent with the HTML5 parsing spec.

Note that this construct is already disallowed if tidy is disabled; it
is rendered as `&lt;b/>`.  We add a tracking category in the no-tidy
case as well, in preparation for eventually making the no-tidy and
with-tidy behaviors consistent.

Bug: T134423
Change-Id: Ie1cf3aa40d5483bf395ece539f0240b694ff04ab
includes/Sanitizer.php
includes/parser/Parser.php
includes/specials/SpecialTrackingCategories.php
languages/i18n/en.json
languages/i18n/qqq.json