Use standard XML escaping
This commit is contained in:
parent
d46a590f74
commit
a9b2e83daa
1 changed files with 2 additions and 4 deletions
|
|
@ -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(""")
|
||||||
of '\'': result.add("'")
|
of '\'': result.add("'")
|
||||||
of '/': result.add("/")
|
|
||||||
else: result.add(c)
|
else: result.add(c)
|
||||||
|
|
||||||
proc escape*(s: string): string =
|
proc escape*(s: string): string =
|
||||||
|
|
@ -508,8 +507,7 @@ proc escape*(s: string): string =
|
||||||
## ``>`` ``>``
|
## ``>`` ``>``
|
||||||
## ``&`` ``&``
|
## ``&`` ``&``
|
||||||
## ``"`` ``"``
|
## ``"`` ``"``
|
||||||
## ``'`` ``'``
|
## ``'`` ``'``
|
||||||
## ``/`` ``/``
|
|
||||||
## ------------ -------------------
|
## ------------ -------------------
|
||||||
##
|
##
|
||||||
## You can also use `addEscaped proc <#addEscaped,string,string>`_.
|
## You can also use `addEscaped proc <#addEscaped,string,string>`_.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue