diff --git a/ui/tabs.js b/ui/tabs.js index 75723239c..3bd7b9246 100644 --- a/ui/tabs.js +++ b/ui/tabs.js @@ -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;