Use standard XML escaping

This commit is contained in:
Emery Hemingway 2019-02-10 15:49:11 +01:00 • committed by Andreas Rumpf
commit d1e3f58afc

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