Prevent unexpected }- in converter output
authorLiangent <liangent@gmail.com>
Thu, 23 Apr 2015 06:33:48 +0000 (06:33 +0000)
committerC. Scott Ananian <cananian@wikimedia.org>
Wed, 25 Jan 2017 17:38:08 +0000 (17:38 +0000)
commit4312c2ad40ad08ce425b6f23acc617bf25757d16
tree311e6ea4ee0d44e09cb6edc789d5b9e52eb34989
parentb843994408cd0b4d9f2676ae87225258e0497913
Prevent unexpected }- in converter output

Previously for input -{<span title="-{X}-">X</span>}-, the converter
sees -{<span title="-&#123;X}-">A</span>}-, so <span title="-&#123;X
becomes the content in the first block, and a stray }- is left to output.

Now, the converter sees -{<span title="-&#123;X&#125;-">A</span>}- with
this change. In further processing, the span tag may be parsed and have
its title attrib converted. For cases where the content is not processed
further (eg. "R" = raw flag), "-{X}-" is left as is in the attrib, which
is not so ideal, but at least it's better than the original extra }-
outside the whole tag.

Change-Id: Idbaaf53f914f362e5b8cc9fad02a524f8d591bb7
includes/Sanitizer.php
tests/parser/parserTests.txt