aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/zwobble
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-02-14 10:59:45 +0000
committerMichael Williamson <mike@zwobble.org>2016-02-14 10:59:45 +0000
commit680d29eb63b3f083cbca8b5be367394006f71fb3 (patch)
treebd3fa7c3bae8298e08e630c6cc8ad51bc152809f /src/main/java/org/zwobble
parent5c8c5d57d37f4411630828e3c658bb23e10e207b (diff)
Escape HTML text nodes
Diffstat (limited to 'src/main/java/org/zwobble')
-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 2c3a7c2..c6d02ec 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);
+ builder.append(value.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;"));
}
}