aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble/mammoth/html/HtmlTextNode.java
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-02-14 11:54:18 +0000
committerMichael Williamson <mike@zwobble.org>2016-02-14 11:54:18 +0000
commit3f2896045e54a254f8ee007c43d179ed750d78b9 (patch)
tree8578acd0d15f9d713ffa07c484051560cb2c5595 /src/main/java/org/zwobble/mammoth/html/HtmlTextNode.java
parentf59712756ccb8d6b140d90ea0220278d60cf6dc7 (diff)
Escape element attribute values
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/html/HtmlTextNode.java')
-rw-r--r--src/main/java/org/zwobble/mammoth/html/HtmlTextNode.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/zwobble/mammoth/html/HtmlTextNode.java b/src/main/java/org/zwobble/mammoth/html/HtmlTextNode.java
index c6d02ec..bc8d1f8 100644
--- a/src/main/java/org/zwobble/mammoth/html/HtmlTextNode.java
+++ b/src/main/java/org/zwobble/mammoth/html/HtmlTextNode.java
@@ -9,6 +9,6 @@ public class HtmlTextNode implements HtmlNode {
@Override
public void write(StringBuilder builder) {
- builder.append(value.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;"));
+ builder.append(HtmlWriter.escapeText(value));
}
}