Opened 12 years ago

Closed 10 years ago

#11966 closed defect (fixed)

[patch] dojox.html.set(): Workaround for a breaking change/bug in Firefox 4.0b7

Reported by: Thomas Bachem Owned by: Kris Zyp
Priority: high Milestone: 1.8
Component: Dojox Version: 1.5
Keywords: Cc:
Blocked By: Blocking:


See also my corresponding Firefox bug ticket:

FF4.0b7 behaves different on RegExp? pattern matching than all other browsers when it comes to the pattern from dojox/html/_base.js line 185:

return cont.replace(/<script\s*(?![^>]*type=['"]?(?:dojo\/|text\/html\b))(?:[^>]*?(?:src=(['"]?)([^>]*?)\1[^>]*)?)*>([\s\S]*?)<\/script>/gi,

There's an unnecessary subpattern in this RegExp? pattern that seems to confuse FF4, we can just remove it as a workaround:

return cont.replace(/<script\s*(?![^>]*type=['"]?(?:dojo\/|text\/html\b))[^>]*?(?:src=(['"]?)([^>]*?)\1[^>]*)?>([\s\S]*?)<\/script>/gi,

Change History (6)

comment:1 Changed 12 years ago by Adam Peller

Milestone: tbd1.6
Owner: changed from Adam Peller to Sam Foster

comment:2 Changed 11 years ago by bill

Milestone: 1.61.7

Changing milestone to 1.7 since 1.6 was already released, although maybe this should be backported to 1.6 branch, FF4 is RC now IIRC.

comment:3 Changed 10 years ago by dylan

Owner: changed from Sam Foster to Kris Zyp
Status: newassigned

Reassigning to Kris as this seems like an easy fix for Dojo 1.8

comment:4 Changed 10 years ago by Adam Peller

The Firefox bug was apparently fixed. Is the workaround still necessary?

comment:5 Changed 10 years ago by bill

I was thinking that too, but the so called "workaround" is actually more of a simplification/optimization.

comment:6 Changed 10 years ago by Kris Zyp

Resolution: fixed
Status: assignedclosed

In [29078]:

Simplify script detection regex, fixes #11966 !strict

Note: See TracTickets for help on using tickets.