You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/04/18 03:39:00 UTC

[jira] [Resolved] (GROOVY-9080) MarkupTemplateEngine uses invalid XML entity for escaping double quotes

     [ https://issues.apache.org/jira/browse/GROOVY-9080?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King resolved GROOVY-9080.
-------------------------------
       Resolution: Fixed
         Assignee: Paul King
    Fix Version/s: 2.5.7
                   3.0.0-beta-1

Should be fixed. Thanks for spotting the issue.

> MarkupTemplateEngine uses invalid XML entity for escaping double quotes
> -----------------------------------------------------------------------
>
>                 Key: GROOVY-9080
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9080
>             Project: Groovy
>          Issue Type: Bug
>          Components: Templating
>    Affects Versions: 3.0.0-alpha-4, 2.5.6
>            Reporter: Dan Ziemba
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 3.0.0-beta-1, 2.5.7
>
>
> When MarkupTemplateEngine is used with 'useDoubleQuotes' config enabled, incorrect output is produced. 
> Given this example code:
> {code:java}
> import groovy.text.markup.*
> def out = new MarkupTemplateEngine(new TemplateConfiguration(useDoubleQuotes: true))
>         .createTemplate('''tag(attr: 'contains " quote')''')
>         .make()
> println out
> {code}
> Result is:
> {noformat}
> <tag attr="contains &quote; quote"/>
> {noformat}
> But expected result is:
> {noformat}
> <tag attr="contains &quot; quote"/>
> {noformat}
> The wrong XML entity is used - &quote is not valid. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)