21998: properly percent-encode paths in keep-web directory listing page
authorZoë Ma <zoe.ma@curii.com>
Thu, 11 Jul 2024 17:05:06 +0000 (01:05 +0800)
committerZoë Ma <zoe.ma@curii.com>
Thu, 25 Jul 2024 02:56:42 +0000 (10:56 +0800)
commit680ab31b5765059625faf00a2af163eb1756640e
tree1396dfd545f6806a301a4952ffc23e7240153bd1
parent4a883e2d383d99260a1301770faf20e77b594d1c
21998: properly percent-encode paths in keep-web directory listing page

Use percent-encoded form of the relative URLs as the value of "href"
attribute in directory listing page generated by keep-web

The "wget" command example shown on the page now has single-quotes
around the URL argument.

For testing involving complex URL or path patterns, use the HTML parser
provided by golang.org/x/net/html to scrape the directory listing page,
instead of using regular expressions that may get unwieldy.

Minor edits to the HTML template for compliance and ease of testing.

Arvados-DCO-1.1-Signed-off-by: Zoë Ma <zoe.ma@curii.com>
services/keep-web/handler.go
services/keep-web/handler_test.go