You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Sinuhé (JIRA)" <ji...@apache.org> on 2017/01/05 22:09:58 UTC

[jira] [Created] (GROOVY-8039) Escape XML on BaseTemplate.writeBody()

Sinuhé created GROOVY-8039:
------------------------------

             Summary: Escape XML on BaseTemplate.writeBody()
                 Key: GROOVY-8039
                 URL: https://issues.apache.org/jira/browse/GROOVY-8039
             Project: Groovy
          Issue Type: Bug
          Components: Templating
    Affects Versions: 2.4.7
            Reporter: Sinuhé
            Priority: Minor


A markup template such as:
{code}
p('a text containing a <tag>')
{code}
Prints an invalid XML/HTML. To resolve this it's enough to change last line in *groovy.text.markup.BaseTemplate.writeBody()* to:
{code}
out.write(escapeXml(body.toString()));
{code} 




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)