diff options
author | bptato <nincsnevem662@gmail.com> | 2023-10-18 13:01:58 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-10-18 13:01:58 +0200 |
commit | 46837a6b7186afd9fc2a45b6152672e553ac2c9e (patch) | |
tree | 90b43276f7f687c7931d924694180d5c5e83d852 | |
parent | 1b15372501435f006be218105726a0c49dd23771 (diff) | |
download | chawan-46837a6b7186afd9fc2a45b6152672e553ac2c9e.tar.gz |
dirlist: quote path names in href
so that it does not choke on files with an apos in them. (We could also htmlEscape it, but this should be enough since we percent-encode the paths already.)
-rw-r--r-- | src/loader/dirlist.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/loader/dirlist.nim b/src/loader/dirlist.nim index 5de79084..2328cd55 100644 --- a/src/loader/dirlist.nim +++ b/src/loader/dirlist.nim @@ -42,7 +42,7 @@ func makeDirlist*(items: seq[DirlistItem]): string = path &= '/' elif item.t == ITEM_DIR: path &= '/' - var line = "<A HREF=" & path & '>' & htmlEscape(name) & "</A>" + var line = "<A HREF=\"" & path & "\">" & htmlEscape(name) & "</A>" while width <= maxw: if width mod 2 == 0: line &= ' ' |