Skip to content

Commit c193a0c

Browse files
committed
Menu: Escape em and en dashes in regex. Fixes #9016 - Menu: Non-ASCII characters.
1 parent 2a8494f commit c193a0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.menu.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ $.widget( "ui.menu", {
323323
menus.children( ":not(.ui-menu-item)" ).each(function() {
324324
var item = $( this );
325325
// hyphen, em dash, en dash
326-
if ( !/[^\-\s]/.test( item.text() ) ) {
326+
if ( !/[^\-\u2014\u2013\s]/.test( item.text() ) ) {
327327
item.addClass( "ui-widget-content ui-menu-divider" );
328328
}
329329
});

0 commit comments

Comments
 (0)