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:02:52 UTC
[groovy] branch master 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 master
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/master by this push:
new 1ec71b0 GROOVY-9080: MarkupTemplateEngine uses invalid XML entity for escaping double quotes
1ec71b0 is described below
commit 1ec71b01e037e80b757bec80b5270e744de3ed9a
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() ? ""e;" : "'";
+ String escape = configuration.isUseDoubleQuotes() ? """ : "'";
return str.replace(quote, escape);
}