Details
Description
When text reports contains script tags (the closing </script> to be exact), the decorator breaks since the browser parses the script tags before the CDATA xml tag.
E.g. if you have a step like:
When I enter <script>test();</script>
Then something else
the resulting _txt.html file looks like this:
<script type="syntaxhighlighter" class="brush: text"><![CDATA[
When I enter <script>test();</script>
Then something else
]]></script>
the browser will stop parsing the script tag at the first </script>.
the fix changes the CDATA tag to html encoding if the text contains </script>, in all other cases wrapping the text in CDATA is correct.
Activity
Mauro Talevi
made changes -
Field | Original Value | New Value |
---|---|---|
Status | Open [ 1 ] | Resolved [ 5 ] |
Assignee | Mauro Talevi [ maurotalevi ] | |
Fix Version/s | 3.6 [ 17721 ] | |
Resolution | Fixed [ 1 ] |
https://github.com/alexlehm/jbehave-core/commit/07af4bebd7dbfcdc3116e9ab728769346c20ac73