Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Percent-encode a clone url in its href
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.
Diffstat (limited to 'source/ui-shared.c')
| -rw-r--r-- | source/ui-shared.c | 4 |
1 file changed, 2 insertions, 2 deletions
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("<link rel='vcs-git' href='"); - html_attr(url); + html_attr_url(url); html("' title='"); html_attr(ctx.repo->name); html(" Git repository'>\n"); @@ -1736,7 +1736,7 @@ void cgit_print_clone_row(const char *url, int colspan) html("<a rel='vcs-git' title='"); html_attr(ctx.repo->name); html(" Git repository' href='"); - html_attr(href); + html_attr_url(href); html("'>"); html_txt(url); html("</a></td></tr>\n"); |
