Don't prevent ',' from getting escaped in theindex.html

- Enable escaping of links in theindex.html
- Fixes https://github.com/nim-lang/Nim/issues/9107.
- Second part of the fix for https://github.com/nim-lang/Nim/issues/9097.
This commit is contained in:
Kaushal Modi 2018-09-28 14:45:06 -04:00
commit 903886396d
3 changed files with 12 additions and 7 deletions

View file

@ -60,6 +60,7 @@ proc encodeUrl*(s: string, usePlus=true): string =
let fromSpace = if usePlus: "+" else: "%20"
for c in s:
case c
# https://tools.ietf.org/html/rfc3986#section-2.3
of 'a'..'z', 'A'..'Z', '0'..'9', '-', '.', '_', '~': add(result, c)
of ' ': add(result, fromSpace)
else: