You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2019/04/18 03:03:49 UTC

[groovy] branch GROOVY_2_5_X updated: GROOVY-9080: MarkupTemplateEngine uses invalid XML entity for escaping double quotes

This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
     new 87c09dc  GROOVY-9080: MarkupTemplateEngine uses invalid XML entity for escaping double quotes
87c09dc is described below

commit 87c09dc6bbe5f38d77d41d325467f74d039f75f6
Author: Paul King <pa...@asert.com.au>
AuthorDate: Thu Apr 18 13:02:41 2019 +1000

    GROOVY-9080: MarkupTemplateEngine uses invalid XML entity for escaping double quotes
---
 .../src/main/groovy/groovy/text/markup/BaseTemplate.java                | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/BaseTemplate.java b/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/BaseTemplate.java
index fc58fc8..c953c4f 100644
--- a/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/BaseTemplate.java
+++ b/subprojects/groovy-templates/src/main/groovy/groovy/text/markup/BaseTemplate.java
@@ -211,7 +211,7 @@ public abstract class BaseTemplate implements Writable {
 
     private String escapeQuotes(String str) {
         String quote = configuration.isUseDoubleQuotes() ? "\"" : "'";
-        String escape = configuration.isUseDoubleQuotes() ? "&quote;" : "&apos;";
+        String escape = configuration.isUseDoubleQuotes() ? "&quot;" : "&apos;";
         return str.replace(quote, escape);
     }