1
0
mirror of synced 2025-02-04 06:09:23 +03:00

Merge pull request #346 from Polonious/master

Escapes special characters in containerId selector
This commit is contained in:
Igor Vaynberg 2012-08-18 09:03:20 -07:00
commit b5cceab21e

View File

@ -560,6 +560,7 @@
this.container = this.createContainer();
this.containerId="s2id_"+(opts.element.attr("id") || "autogen"+nextUid());
this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g, '\\$1');
this.container.attr("id", this.containerId);
// cache the body so future lookups are cheap
@ -942,7 +943,7 @@
*/
// abstract
opening: function() {
var cid = this.containerId, selector = "#"+ cid,
var cid = this.containerId, selector = this.containerSelector,
scroll = "scroll." + cid, resize = "resize." + cid;
this.container.parents().each(function() {