From b0bf3a520b80ee2bc6169416d7784b77404bbe9b Mon Sep 17 00:00:00 2001 From: "Amir E. Aharoni" Date: Sat, 12 Jul 2014 14:01:06 +0300 Subject: [PATCH] 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 --- includes/specials/SpecialVersion.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 = ''; -- 2.20.1