summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorEmery Hemingway <ehmry@posteo.net>2019-02-10 15:49:11 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-02-13 23:30:14 +0100
commitd1e3f58afcaa6d28dd1be80497fb57a65e2f5032 (patch)
tree8206f1d2d8083e53f80ed252d42d6a2f05763188
parentf785286743589c2e089290e5f1a6567ecae5530f (diff)
downloadNim-d1e3f58afcaa6d28dd1be80497fb57a65e2f5032.tar.gz
Use standard XML escaping
-rw-r--r--lib/pure/xmltree.nim6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/pure/xmltree.nim b/lib/pure/xmltree.nim
index e1d24ea42..2564c4465 100644
--- a/lib/pure/xmltree.nim
+++ b/lib/pure/xmltree.nim
@@ -492,8 +492,7 @@ proc addEscaped*(result: var string, s: string) =
     of '>': result.add("&gt;")
     of '&': result.add("&amp;")
     of '"': result.add("&quot;")
-    of '\'': result.add("&#x27;")
-    of '/': result.add("&#x2F;")
+    of '\'': result.add("&apos;")
     else: result.add(c)
 
 proc escape*(s: string): string =
@@ -508,8 +507,7 @@ proc escape*(s: string): string =
   ##  ``>``          ``&gt;``
   ##  ``&``          ``&amp;``
   ##  ``"``          ``&quot;``
-  ##  ``'``          ``&#x27;``
-  ##  ``/``          ``&#x2F;``
+  ##  ``'``          ``&apos;``
   ## ------------    -------------------
   ##
   ## You can also use `addEscaped proc <#addEscaped,string,string>`_.