Menu: Escape em and en dashes in regex. Fixes #9016 - Menu: Non-ASCII characters.

This commit is contained in:
Scott González 2013-01-31 09:05:04 -05:00
parent 2a8494fc81
commit c193a0ce17

View 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" );
}
});