Skip to content

Commit 5f10fa6

Browse files
committed
Tabs: Escape all special characters when sanitizing hash selectors. Fixes #4681 - Tabs: _sanitizeSelector needs to escape '.'.
1 parent 5fb2468 commit 5f10fa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.tabs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ $.widget( "ui.tabs", {
144144

145145
_sanitizeSelector: function( hash ) {
146146
// we need this because an id may contain a ":"
147-
return hash ? hash.replace( /:/g, "\\:" ) : "";
147+
return hash ? hash.replace( /[!"$%&'()*+,.\/:;<=>?@[\]^`{|}~]/g, "\\$&" ) : "";
148148
},
149149

150150
refresh: function() {

0 commit comments

Comments
 (0)