merged things from devel
This commit is contained in:
commit
9d9c3fe121
14 changed files with 110 additions and 48 deletions
|
|
@ -154,6 +154,8 @@ proc addEscaped*(result: var string, s: string) =
|
|||
of '>': result.add(">")
|
||||
of '&': result.add("&")
|
||||
of '"': result.add(""")
|
||||
of '\'': result.add("'")
|
||||
of '/': result.add("/")
|
||||
else: result.add(c)
|
||||
|
||||
proc escape*(s: string): string =
|
||||
|
|
@ -167,6 +169,8 @@ proc escape*(s: string): string =
|
|||
## ``>`` ``>``
|
||||
## ``&`` ``&``
|
||||
## ``"`` ``"``
|
||||
## ``'`` ``'``
|
||||
## ``/`` ``/``
|
||||
## ------------ -------------------
|
||||
result = newStringOfCap(s.len)
|
||||
addEscaped(result, s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue