Tabs: Use $.ui.escapeSelector to avoid invalid selectors

This commit is contained in:
Alexander Schmitz 2015-04-27 02:34:56 -04:00
parent 737b690cde
commit 1ee8e230bd

View File

@ -713,7 +713,7 @@ $.widget( "ui.tabs", {
_getIndex: function( index ) {
// meta-function to give users option to provide a href string instead of a numerical index.
if ( typeof index === "string" ) {
index = this.anchors.index( this.anchors.filter( "[href$='" + index + "']" ) );
index = this.anchors.index( this.anchors.filter( "[href$='" + $.ui.escapeSelector( index ) + "']" ) );
}
return index;