Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#3981 closed defect (fixed)

dojox.layout.ContentPane script tag match requires empty script tag or a src attribute

Reported by: guest Owned by: mumme
Priority: high Milestone: 0.9
Component: DojoX Layout Version: 0.9
Keywords: contentpane script tag Cc:
Blocked By: Blocking:

Description

Since [9850] the script regex will match:

<script> correct <script src='xxx'> correct <script type='text/javascript' src='xxx'> correct

and skips <script type='dojo/method' > correct and <script type='text/javascript'> incorrect

the following regex fixes the problem (I think).

<code>

<scripts*(?![>]*type=['"]?dojo)(?:[>]*?(src=(['"]?)([>]*?)1[>]*)?)?>([sS]*?)</script>

</code>

Change History (6)

comment:1 Changed 12 years ago by guest

F! a D!

try this:

<scripts*(?![^>]*type=['"]?dojo)(?:[^>]*?(src=(['"]?)([^>]*?)1[^>]*)?)?>([sS]*?)</script>

comment:2 Changed 12 years ago by guest

BTW I have a CLA on file dojo@…

comment:3 Changed 12 years ago by bill

Owner: changed from Tom Trenka to mumme

comment:4 Changed 12 years ago by guest

This will really do it as a drop in replacement for the pattern. (capture groups are the same as they used are in the existing source).

<scripts*(?![^>]*type=['"]?dojo)(?:[^>]*?(?:src=(['"]?)([^>]*?)1[^>]*)?)*>([sS]*?)</script>

comment:5 Changed 12 years ago by mumme

Resolution: fixed
Status: newclosed

(In [9965]) Make script match regex a bit smarter, didn't match type='text/javascript' correctly, added a test for that. Credits to reporter of ticket 3981, cpusoftware.com

Fixes #3981

comment:6 Changed 9 years ago by bill

Component: DojoxDojoX Layout
Note: See TracTickets for help on using tickets.