commit 07af4bebd7dbfcdc3116e9ab728769346c20ac73 Author: Alex Lehmann <alexl...@gmail.com> AuthorDate: Fri Jan 13 19:21:57 2012 +0100 Commit: Alex Lehmann <alexl...@gmail.com> CommitDate: Fri Jan 13 19:21:57 2012 +0100
JBEHAVE-705: decorated txt reports get broken if the text contains <script></script> tags diff --git a/jbehave-core/src/main/resources/ftl/jbehave-report-decorated.ftl b/jbehave-core/src/main/resources/ftl/jbehave-report-decorated.ftl index 618f535..1d0bfa5 100755 --- a/jbehave-core/src/main/resources/ftl/jbehave-report-decorated.ftl +++ b/jbehave-core/src/main/resources/ftl/jbehave-report-decorated.ftl @@ -11,9 +11,11 @@ ${body} <#else> <#assign brushFormat = format> <#if format == "stats"><#assign brushFormat = "plain"> </#if> -<script type="syntaxhighlighter" class="brush: ${brushFormat}"><![CDATA[ +<script type="syntaxhighlighter" class="brush: ${brushFormat}"><#if format != "txt" || !body.contains("</script>")><![CDATA[ ${body} -]]></script> +]]><#else> +${body?html} +</#if></script> </#if> </body> <#include "./sh.ftl">