]> source.dussan.org Git - jquery-ui.git/commitdiff
Tabs: Escape all special characters when sanitizing hash selectors. Fixes #4681 ...
authorScott González <scott.gonzalez@gmail.com>
Tue, 17 May 2011 14:02:22 +0000 (10:02 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 17 May 2011 14:02:22 +0000 (10:02 -0400)
ui/jquery.ui.tabs.js

index 36c9000efaf97f8bd1de0a74f9684e1e31ff0d48..7702c1e4b75ca1219203e8cb661461812e37ccfc 100644 (file)
@@ -144,7 +144,7 @@ $.widget( "ui.tabs", {
 
        _sanitizeSelector: function( hash ) {
                // we need this because an id may contain a ":"
-               return hash ? hash.replace( /:/g, "\\:" ) : "";
+               return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@[\]^`{|}~]/g, "\\$&" ) : "";
        },
 
        refresh: function() {