decorated txt reports get broken if the text contains <script></script> tags

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.

Assignee

Mauro Talevi

Reporter

Alexander Lehmann

Labels

None

Components

Fix versions

Affects versions

Priority

Minor
Configure