]> git.cameronkatri.com Git - cgit.git/blobdiff - html.c
Use mode 0644 for non-executable files
[cgit.git] / html.c
diff --git a/html.c b/html.c
index 167127f31dd0d2f35c2dcd8e470df21f216f7e08..d7d9fd7007ff764c17ead46f23f00eaf44ade142 100644 (file)
--- 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;