From 5703446c1225212478731b884a215cac77155c59 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 19:29:15 -1000 Subject: Percent-encode a clone url in its href MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An href carried git://example.org/dépôt.git as it was, and the space of "with space" too, neither of which a url may hold. html_url_path would also encode the plus of git+ssh, which breaks the scheme, and the percent of an escape the url was written with, so a whole url gets a helper that encodes only the bytes RFC 3986 allows nowhere. --- source/ui-shared.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/ui-shared.c') diff --git a/source/ui-shared.c b/source/ui-shared.c index 985f33d..9e3757d 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -243,7 +243,7 @@ static void print_rel_vcs_link(const char *url) if (!has_uri_scheme(url)) return; html("\n"); @@ -1736,7 +1736,7 @@ void cgit_print_clone_row(const char *url, int colspan) html(""); html_txt(url); html("\n"); -- cgit 2.12.1