changeset 8144:8eeb4b717dca

Merged.
author Sascha L. Teichmann <teichmann@intevation.de>
date Tue, 26 Aug 2014 17:21:42 +0200
parents 7021753b3797 (diff) d4e4dde1d5cb (current diff)
children 52504fc2cd58
files
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java	Tue Aug 26 17:16:21 2014 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java	Tue Aug 26 17:21:42 2014 +0200
@@ -1172,7 +1172,10 @@
                 result[0] = null;
                 if (frames.getStore(key, result)) {
                     m.appendReplacement(
-                        sb, result[0] != null ? result[0].toString() : "");
+                        sb,
+                        result[0] != null 
+                            ? Matcher.quoteReplacement(result[0].toString())
+                            : "");
                 }
                 else {
                     m.appendReplacement(sb, "\\${" + key + "}");
@@ -1189,7 +1192,9 @@
                 String expr = m.group(1);
                 Object result = evaluateXPath(expr, XPathConstants.STRING);
                 if (result instanceof String) {
-                    m.appendReplacement(sb, (String)result);
+                    m.appendReplacement(
+                        sb,
+                        Matcher.quoteReplacement((String)result));
                 }
                 else {
                     m.appendReplacement(sb, "");

http://dive4elements.wald.intevation.org