#10156 closed defect (fixed)
miscalced dojo root when working from source
Reported by: | Mike Wilson | Owned by: | Rawld Gill |
---|---|---|---|
Priority: | low | Milestone: | 1.8 |
Component: | Loader | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
There is a small bug in the getRootNode() function in SVN/dojo/dojo.js, wrt the regexp on line 57:
var rePkg = /dojo\.js(\W|$)/i;
The problem is it will match on other script URLs that end with "dojo.js", f ex:
<script src="my-stuff-for-dojo.js"></script> <script src="dojo.js"></script>
results in:
root = "my-stuff-for-"
which will break loading of further Dojo files. This bug can easily be corrected by making the regexp more restrictive.
Change History (11)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Owner: | changed from anonymous to James Burke |
---|
comment:3 Changed 11 years ago by
Milestone: | tbd → 1.5 |
---|
This regexp has been there for a while, pushing to 1.5.
comment:4 Changed 11 years ago by
Milestone: | 1.5 → 1.6 |
---|
comment:5 Changed 10 years ago by
Milestone: | 1.6 → future |
---|
(sadly) punting seemingly abandoned ticket and meta tickets to future
comment:6 Changed 9 years ago by
Component: | General → Loader |
---|---|
Milestone: | future → tbd |
Owner: | changed from James Burke to Rawld Gill |
Status: | new → assigned |
There's no getRootNode() method anymore but there is a regex in dojo.js:
/(.*)\/?dojo\.js(\W|$)/
Looks like it will incorrectly match my-stuff-for-dojo.js due to the ? after the slash. Maybe you want something like:
/(\/|^)dojo.js(\W|$)/
comment:7 Changed 9 years ago by
Priority: | high → low |
---|
comment:11 Changed 9 years ago by
Milestone: | tbd → 1.8 |
---|
Note: See
TracTickets for help on using
tickets.
Btw, I should mention that this bug applies to current HEAD as well (1.4 beta).