]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Use $.ui.escapeSelector to avoid invalid selectors
authorAlexander Schmitz <arschmitz@gmail.com>
Mon, 27 Apr 2015 06:34:56 +0000 (02:34 -0400)
committerAlexander Schmitz <arschmitz@gmail.com>
Wed, 6 May 2015 01:43:57 +0000 (21:43 -0400)
ui/tabs.js

index 75723239c3c492905232aa2ff0f9011a018c8010..3bd7b9246f22e853bc4ec65c6c93f1ba852982b7 100644 (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;