Use standard XML escaping

This commit is contained in:
Emery Hemingway
2019-02-10 15:49:11 +01:00
parent d46a590f74
commit a9b2e83daa

View File

@@ -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>`_.