Opened 15 years ago
Closed 15 years ago
#2035 closed bug (wontfix)
"clean" RegExp fails in Safari 412
Reported by: | ajpotts | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.2.4 |
Component: | core | Version: | 1.2.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description (last modified by )
This line
elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){...
will fail in Safari 2.0 build 412 (and presumably before). Safari doesn't see the end of the regex at all, and so pretty much everything goes wrong.
Quick fix:
elem = elem.replace(new RegExp("(<(\w+)[^>]*?)\/>"), function(all, front, tag){ ...
Obviously early Safari has a problem with parsing RegExps in the /.../g style, but I haven't found any other problems yet.
Attachments (1)
Change History (5)
comment:1 Changed 15 years ago by
comment:2 Changed 15 years ago by
Description: | modified (diff) |
---|
Changed 15 years ago by
comment:3 Changed 15 years ago by
This seems to fix a lot of Safari 2 issues with appending/inserting content.
comment:4 Changed 15 years ago by
Milestone: | 1.2.2 → 1.2.4 |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
That is a very old version of Safari.. and not supported.
There's no point in fixing this, that kind of regexps take more time to process, and that function is called a lot.
Closing as invalid.
Sorry, didn't spot the browser compatibility change to 2.0.2.
For what it's worth, 2.0 test suite errors are largely confined to unicode selectors. Still, this fix is valid for anyone who cares. Allows thickbox amongst others to work fine.