diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2019-02-10 19:33:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-10 19:33:59 +0100 |
commit | c5dc46926c3b18252cb03bbd6639d27813e5cb8e (patch) | |
tree | c09eab316c5fb764c73e1b59e023a298cce5e41e | |
parent | f0e6becc235c15709ef84598f52c765687941056 (diff) | |
parent | a9b2e83daa7c1cb1fbf1cab0a6b33ad27b36c7ff (diff) | |
download | Nim-c5dc46926c3b18252cb03bbd6639d27813e5cb8e.tar.gz |
Merge pull request #10622 from ehmry/xml
Use standard XML escaping
-rw-r--r-- | lib/pure/xmltree.nim | 6 |
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(">") of '&': result.add("&") of '"': result.add(""") - of '\'': result.add("'") - of '/': result.add("/") + of '\'': result.add("'") else: result.add(c) proc escape*(s: string): string = @@ -508,8 +507,7 @@ proc escape*(s: string): string = ## ``>`` ``>`` ## ``&`` ``&`` ## ``"`` ``"`` - ## ``'`` ``'`` - ## ``/`` ``/`` + ## ``'`` ``'`` ## ------------ ------------------- ## ## You can also use `addEscaped proc <#addEscaped,string,string>`_. |