Alexander Lehmann created JBEHAVE-705:
-----------------------------------------

             Summary: decorated txt reports get broken if the text contains 
<script></script> tags
                 Key: JBEHAVE-705
                 URL: https://jira.codehaus.org/browse/JBEHAVE-705
             Project: JBehave
          Issue Type: Bug
          Components: Core
    Affects Versions: 3.5.4
            Reporter: Alexander Lehmann
            Priority: Minor


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:

{quote}
When I enter <script>test();</script>
Then something else
{quote}

the resulting _txt.html file looks like this:

{quote}
<script type="syntaxhighlighter" class="brush: text"><![CDATA[
When I enter <script>test();</script>
Then something else
]]></script>
{quote}

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.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to