bidi-isolate usernames in Linker::userLink
authorMoriel Schottlender <moriel@gmail.com>
Wed, 31 Aug 2016 20:58:05 +0000 (13:58 -0700)
committerMoriel Schottlender <moriel@gmail.com>
Thu, 1 Sep 2016 00:44:06 +0000 (17:44 -0700)
commit1fff06ad2d9b75076b1aae2313cdf55c6fa2d31f
tree148d629933dd5b8cb411018699aa7dd3991c889d
parentfb2523edf2f52601ca998ab002ce8b7c5d848c08
bidi-isolate usernames in Linker::userLink

Usernames can be in any script/language and include weak and neutral
characters like parentheses and dashes - these flip and make things
look very weird when displayed in the opposite directionality.

This fix adds <bdi> tags to isolate the username when we output user
links. This will affect displays like user personal tools, history
and diff view.

Also, fixing LogFormatterTestCase::removeSomeHtml() that expected
a very rigid html input (and thus failed with the new <bdi> wrapping)
to use strip_tags() instead.

Change-Id: I2db5f4b7d3a00726461eb6b699fbdf0ecd47a1cb
includes/Linker.php
tests/phpunit/includes/LinkerTest.php
tests/phpunit/includes/logging/LogFormatterTestCase.php