Merge "Bidi-isolate and nowrap parser tags on Special:Version"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 29 Sep 2014 20:16:12 +0000 (20:16 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 29 Sep 2014 20:16:12 +0000 (20:16 +0000)
1  2 
includes/specials/SpecialVersion.php

@@@ -525,8 -525,17 +525,17 @@@ class SpecialVersion extends SpecialPag
                        );
  
                        array_walk( $tags, function ( &$value ) {
-                               $value = '&lt;' . htmlspecialchars( $value ) . '&gt;';
+                               // 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 = '';
                        $licenseLink = Linker::link(
                                $this->getPageTitle( 'License/' . $extensionName ),
                                $out->parseInline( $extension['license-name'] ),
 -                              array( 'class' => 'mw-version-ext-license' )
 +                              array(
 +                                      'class' => 'mw-version-ext-license',
 +                                      'dir' => 'auto',
 +                              )
                        );
                } elseif ( $this->getExtLicenseFileName( $extensionPath ) ) {
                        $licenseLink = Linker::link(
                                $this->getPageTitle( 'License/' . $extensionName ),
                                $this->msg( 'version-ext-license' ),
 -                              array( 'class' => 'mw-version-ext-license' )
 +                              array(
 +                                      'class' => 'mw-version-ext-license',
 +                                      'dir' => 'auto',
 +                              )
                        );
                }