X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/a36a0d9dec8a3ba79501d2526d648e44306f0fdd..b7f33786ef4b155a11b0324f84bbde5d7fc9c998:/html.c?ds=inline diff --git a/html.c b/html.c index 167127f..d7d9fd7 100644 --- a/html.c +++ b/html.c @@ -128,6 +128,22 @@ void html_attr(char *txt) html(txt); } +void html_url_path(char *txt) +{ + char *t = txt; + while(t && *t){ + int c = *t; + if (c=='"' || c=='#' || c=='\'' || c=='?') { + write(htmlfd, txt, t - txt); + write(htmlfd, fmt("%%%2x", c), 3); + txt = t+1; + } + t++; + } + if (t!=txt) + html(txt); +} + void html_url_arg(char *txt) { char *t = txt;