diff options
Diffstat (limited to 'src/com/isode')
-rw-r--r-- | src/com/isode/stroke/serializer/xml/XMLElement.java | 10 | ||||
-rw-r--r-- | src/com/isode/stroke/serializer/xml/XMLTextNode.java | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/com/isode/stroke/serializer/xml/XMLElement.java b/src/com/isode/stroke/serializer/xml/XMLElement.java index 43abfea..9512c85 100644 --- a/src/com/isode/stroke/serializer/xml/XMLElement.java +++ b/src/com/isode/stroke/serializer/xml/XMLElement.java @@ -57,11 +57,11 @@ public class XMLElement implements XMLNode { public void setAttribute(String attribute, String value) { String escapedValue = value; - escapedValue.replaceAll("&", "&"); - escapedValue.replaceAll("<", "<"); - escapedValue.replaceAll(">", ">"); - escapedValue.replaceAll("'", "'"); - escapedValue.replaceAll("\"", """); + escapedValue = escapedValue.replaceAll("&", "&"); + escapedValue = escapedValue.replaceAll("<", "<"); + escapedValue = escapedValue.replaceAll(">", ">"); + escapedValue = escapedValue.replaceAll("'", "'"); + escapedValue = escapedValue.replaceAll("\"", """); attributes_.put(attribute, escapedValue); } diff --git a/src/com/isode/stroke/serializer/xml/XMLTextNode.java b/src/com/isode/stroke/serializer/xml/XMLTextNode.java index b6940c4..fa1881e 100644 --- a/src/com/isode/stroke/serializer/xml/XMLTextNode.java +++ b/src/com/isode/stroke/serializer/xml/XMLTextNode.java @@ -10,13 +10,13 @@ package com.isode.stroke.serializer.xml; public class XMLTextNode implements XMLNode { - private final String text_; + private String text_; public XMLTextNode(String text) { text_ = text; - text_.replaceAll("&", "&"); // Should come first - text_.replaceAll("<", "<"); - text_.replaceAll(">", ">"); + text_ = text_.replaceAll("&", "&"); // Should come first + text_ = text_.replaceAll("<", "<"); + text_ = text_.replaceAll(">", ">"); } public String serialize() { |