From cd6b947b208f5818414ed5e160076e47b3b4e620 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sun, 10 Feb 2019 15:49:11 +0100 Subject: [PATCH] Use standard XML escaping --- lib/pure/xmltree.nim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/pure/xmltree.nim b/lib/pure/xmltree.nim index d536cfed0c630..f69a29ca9d802 100644 --- a/lib/pure/xmltree.nim +++ b/lib/pure/xmltree.nim @@ -196,8 +196,7 @@ proc addEscaped*(result: var string, s: string) = of '>': result.add(">") of '&': result.add("&") of '"': result.add(""") - of '\'': result.add("'") - of '/': result.add("/") + of '\'': result.add("'") else: result.add(c) proc escape*(s: string): string = @@ -211,8 +210,7 @@ proc escape*(s: string): string = ## ``>`` ``>`` ## ``&`` ``&`` ## ``"`` ``"`` - ## ``'`` ``'`` - ## ``/`` ``/`` + ## ``'`` ``'`` ## ------------ ------------------- result = newStringOfCap(s.len) addEscaped(result, s)