File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -139,7 +139,7 @@ var Prototype = {
139
139
} ) ( )
140
140
} ,
141
141
142
- ScriptFragment : '<script[^>]*>([\\S\\s]*?)<\/script>' ,
142
+ ScriptFragment : '<script[^>]*>([\\S\\s]*?)<\/script\\s* >' ,
143
143
JSONFilter : / ^ \/ \* - s e c u r e - ( [ \s \S ] * ) \* \/ \s * $ / ,
144
144
145
145
/**
Original file line number Diff line number Diff line change @@ -215,6 +215,9 @@ new Test.Unit.Runner({
215
215
this . assertEqual ( 'foo bar' , 'foo bar' . stripScripts ( ) ) ;
216
216
this . assertEqual ( 'foo bar' , ( 'foo <script>boo();<' + '/script>bar' ) . stripScripts ( ) ) ;
217
217
this . assertEqual ( 'foo bar' , ( 'foo <script type="text/javascript">boo();\nmoo();<' + '/script>bar' ) . stripScripts ( ) ) ;
218
+
219
+ this . assertEqual ( 'foo bar' , ( 'foo <script>boo();<' + '/script >bar' ) . stripScripts ( ) ,
220
+ 'should properly handle whitespace in closing tag' ) ;
218
221
} ,
219
222
220
223
testExtractScripts : function ( ) {
You can’t perform that action at this time.
0 commit comments