@@ -366,7 +366,7 @@ describe 'Runner', ->
366366 chai .expect (err .message ).to .contain ' TIMEOUT'
367367 done ()
368368
369- describe ' input data containing </script>' , ->
369+ describe ' input data containing <script>...< /script>' , ->
370370 it ' should succeed' , (done ) ->
371371 filter = local ' return-input'
372372 input = { ' foo' : ' barbaz' , ' htmlscript' : ' <script>alert("Works!")</script>' }
@@ -376,6 +376,26 @@ describe 'Runner', ->
376376 chai .expect (solution).to .eql input
377377 done ()
378378
379+ describe ' input data containing </script>...<script>' , ->
380+ it ' should succeed' , (done ) ->
381+ filter = local ' return-input'
382+ input = { ' foo' : ' barbaz' , ' htmlbogusscript' : ' </script> <script>alert("Works!")</script> <script>' }
383+ options = {}
384+ solver .runJob filter, input, options, (err , solution , details ) ->
385+ chai .expect (err).to .not .exist
386+ chai .expect (solution).to .eql input
387+ done ()
388+
389+ describe ' input data containing HTML comment' , ->
390+ it ' should succeed' , (done ) ->
391+ filter = local ' return-input'
392+ input = { ' foo' : ' barbaz' , ' htmlcomment' : ' <!-- FFOO -->' }
393+ options = {}
394+ solver .runJob filter, input, options, (err , solution , details ) ->
395+ chai .expect (err).to .not .exist
396+ chai .expect (solution).to .eql input
397+ done ()
398+
379399 describe ' filter with infinite loop' , ->
380400 it ' should timeout and return error' , (done ) ->
381401 @ timeout 9000
0 commit comments