Fix langauge converter parser test with self-close tags
authorBrian Wolff <bawolff+wn@gmail.com>
Wed, 15 Nov 2017 05:34:10 +0000 (05:34 +0000)
committerBrian Wolff <bawolff+wn@gmail.com>
Wed, 15 Nov 2017 06:03:22 +0000 (06:03 +0000)
commitf0555bab3d84621aa7a5776c98ae51d72e162291
treeb84e9f92dca46f07bf082167861251190a133dc8
parentb5339a66c079c15aae4877501c430b56aa32a31a
Fix langauge converter parser test with self-close tags

This fixes an issue in f21f3942 where if there was an html
element with an alt or title attribute containing an &lt;
entity, an ascii EOT control character (0x04) may become
inserted into the text if language converter was enabled.

Due to a really old bug in language converter, self-closed tags
got turned into non-self closed tags. However due a different
bug which was fixed in f21f3942 this code path was rarely taken
so nobody noticed until now.

Follow-up Idbc45cac12

Bug: T180552
Change-Id: I077d30c50fcb419837fef937d27caca307153d2d
languages/LanguageConverter.php
tests/parser/parserTests.txt