On 08/10/2012 23:42, Jason A. Donenfeld wrote:
Hi William,

Is this part of a larger series of ampersand fixes? Would you send all of them?

Thanks,
Jason


This includes a patch of all of the ampersand fixes that I could find.
These issues are in the urls cgit generates.
http://www.htmlhelp.com/tools/validator/problems.html#amp

---
 ui-repolist.c |    2 +-
 ui-shared.c   |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ui-repolist.c b/ui-repolist.c
index 7e7f1fb..cab990d 100644
--- a/ui-repolist.c
+++ b/ui-repolist.c
@@ -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);
diff --git a/ui-shared.c b/ui-shared.c
index a1f9d70..9542834 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -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);
--
1.7.9.5

_______________________________________________
cgit mailing list
[email protected]
http://hjemli.net/mailman/listinfo/cgit

Reply via email to