]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu: Escape em and en dashes in regex. Fixes #9016 - Menu: Non-ASCII characters.
authorScott González <scott.gonzalez@gmail.com>
Thu, 31 Jan 2013 14:05:04 +0000 (09:05 -0500)
committerScott González <scott.gonzalez@gmail.com>
Thu, 31 Jan 2013 14:05:16 +0000 (09:05 -0500)
ui/jquery.ui.menu.js

index 4ffe732d4400401757f3f6810ce7dbdc71f9e44e..1c633786d9a1493c4f1e8f5cd4135594ef29dd61 100644 (file)
@@ -323,7 +323,7 @@ $.widget( "ui.menu", {
                menus.children( ":not(.ui-menu-item)" ).each(function() {
                        var item = $( this );
                        // hyphen, em dash, en dash
-                       if ( !/[^\-—–\s]/.test( item.text() ) ) {
+                       if ( !/[^\-\u2014\u2013\s]/.test( item.text() ) ) {
                                item.addClass( "ui-widget-content ui-menu-divider" );
                        }
                });