From: Amir E. Aharoni Date: Sat, 12 Jul 2014 11:01:06 +0000 (+0300) Subject: Bidi-isolate and nowrap parser tags on Special:Version X-Git-Tag: 1.31.0-rc.0~13763^2 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=b0bf3a520b80ee2bc6169416d7784b77404bbe9b;p=lhc%2Fweb%2Fwiklou.git Bidi-isolate and nowrap parser tags on Special:Version The list of parser tags on Special:Version is quite hard to read without bidirectional isolation on RTL wikis. Its direction is RTL, and it mostly includes LTR tags, but it may include RTL tags as well (such as
localized in Hebrew; see I73364ac34ef7a24c48c09ec1f87102a6cbee8d8f ). Bidi-isolation and nowrapping make the list more readable in both RTL and LTR wikis. Screenshot before: https://commons.wikimedia.org/wiki/File:MediaWiki-Special_Version-Gerrit-145758-before.png Schreenshot after: https://commons.wikimedia.org/wiki/File:MediaWiki-Special_Version-Gerrit-145758-after.png Change-Id: I2d3bc48de20af42dcaf8327f2b5f8450fb500e3d --- diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php index cb3fc11845..2a31b808d0 100644 --- a/includes/specials/SpecialVersion.php +++ b/includes/specials/SpecialVersion.php @@ -525,8 +525,17 @@ class SpecialVersion extends SpecialPage { ); array_walk( $tags, function ( &$value ) { - $value = '<' . htmlspecialchars( $value ) . '>'; + // Bidirectional isolation improves readability in RTL wikis + $value = Html::element( + 'bdi', + // Prevent < and > from slipping to another line + array( + 'style' => 'white-space: nowrap;', + ), + "<$value>" + ); } ); + $out .= $this->listToText( $tags ); } else { $out = '';