mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-14 15:23:27 +00:00
Use standard XML escaping
This commit is contained in:
@@ -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>`_.
|
||||
|
||||
Reference in New Issue
Block a user