Bug Tracker

Changes between Initial Version and Version 2 of Ticket #2035


Ignore:
Timestamp:
Dec 14, 2007, 10:59:04 AM (13 years ago)
Author:
brandon
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2035 – Description

    initial v2  
    11This line
    22
    3 elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){...
     3{{{elem = elem.replace(/(<(\w+)[^>]*?)\/>/g, function(all, front, tag){...}}}
    44
    55will 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.
     
    77Quick fix:
    88
    9 elem = elem.replace(new RegExp("(<(\w+)[^>]*?)\/>"), function(all, front, tag){ ...
     9{{{elem = elem.replace(new RegExp("(<(\w+)[^>]*?)\/>"), function(all, front, tag){ ...}}}
    1010
    1111Obviously early Safari has a problem with parsing RegExps in the /.../g style, but I haven't found any other problems yet.