]> gitweb.ps.run Git - ps-cgit/commitdiff
ui: Remember to print ampersand as proper html entities.
authorWilliam Bell <william.bell@frog.za.net>
Tue, 9 Oct 2012 18:45:58 +0000 (20:45 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Wed, 17 Oct 2012 14:30:02 +0000 (16:30 +0200)
ui-repolist.c
ui-shared.c

index c774632622fcaccf9cb62364d3888bbf1c544b1f..36c067a3cb22643c6dca3187c6f84c0a73fda53e 100644 (file)
@@ -104,7 +104,7 @@ void print_sort_header(const char *title, const char *sort)
 {
        htmlf("<th class='left'><a href='%s?s=%s", cgit_rooturl(), sort);
        if (ctx.qry.search) {
-               html("&q=");
+               html("&amp;q=");
                html_url_arg(ctx.qry.search);
        }
        htmlf("'>%s</a></th>", title);
index 43166af4d568125306ff3f88d2f6f97c54d2405e..d9d5da74ac14ddb2e01772571e461dfae36c0844 100644 (file)
@@ -83,7 +83,7 @@ char *cgit_fileurl(const char *reponame, const char *pagename,
        } else {
                tmp = fmt("?url=%s/%s/%s", reponame, pagename,
                          (filename ? filename : ""));
-               delim = "&";
+               delim = "&amp;";
        }
        if (query)
                tmp = fmt("%s%s%s", tmp, delim, query);
@@ -146,19 +146,19 @@ static void site_url(const char *page, const char *search, const char *sort, int
 
        if (page) {
                htmlf("?p=%s", page);
-               delim = "&";
+               delim = "&amp;";
        }
        if (search) {
                html(delim);
                html("q=");
                html_attr(search);
-               delim = "&";
+               delim = "&amp;";
        }
        if (sort) {
                html(delim);
                html("s=");
                html_attr(sort);
-               delim = "&";
+               delim = "&amp;";
        }
        if (ofs) {
                html(delim);
@@ -298,13 +298,13 @@ void cgit_log_link(const char *name, const char *title, const char *class,
                html(delim);
                html("id=");
                html_url_arg(rev);
-               delim = "&";
+               delim = "&amp;";
        }
        if (grep && pattern) {
                html(delim);
                html("qt=");
                html_url_arg(grep);
-               delim = "&";
+               delim = "&amp;";
                html(delim);
                html("q=");
                html_url_arg(pattern);
@@ -313,7 +313,7 @@ void cgit_log_link(const char *name, const char *title, const char *class,
                html(delim);
                html("ofs=");
                htmlf("%d", ofs);
-               delim = "&";
+               delim = "&amp;";
        }
        if (showmsg) {
                html(delim);