RCFilters: Bidi isolate tag names and descriptions
authorMoriel Schottlender <moriel@gmail.com>
Mon, 26 Mar 2018 20:00:25 +0000 (23:00 +0300)
committerMoriel Schottlender <moriel@gmail.com>
Mon, 26 Mar 2018 20:05:04 +0000 (23:05 +0300)
Tags can be untranslated in wikis; most often remain in English
even in an RTL wiki. Since that text is inserted by external
input that can be outside normal translation, we should expect
any directional string in there, and these should be bidi isolated.

Bug: T190718
Change-Id: Iebc3176c5d0f5097badd0dde565a5a6cbfa3a3c2

resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ItemMenuOptionWidget.js

index 1508510..8c349e5 100644 (file)
                $label.append(
                        $( '<div>' )
                                .addClass( 'mw-rcfilters-ui-itemMenuOptionWidget-label-title' )
-                               .append( this.$label )
+                               .append( $( '<bdi>' ).append( this.$label ) )
                );
                if ( this.itemModel.getDescription() ) {
                        $label.append(
                                $( '<div>' )
                                        .addClass( 'mw-rcfilters-ui-itemMenuOptionWidget-label-desc' )
-                                       .text( this.itemModel.getDescription() )
+                                       .append( $( '<bdi>' ).text( this.itemModel.getDescription() ) )
                        );
                }