[PATCH] more & fixes

William Bell william.bell at frog.za.net
Tue Oct 9 20:38:40 CEST 2012



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("&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 = "&";
  	}
  	if (search) {
  		html(delim);
  		html("q=");
  		html_attr(search);
-		delim = "&";
+		delim = "&";
  	}
  	if (sort) {
  		html(delim);
  		html("s=");
  		html_attr(sort);
-		delim = "&";
+		delim = "&";
  	}
  	if (ofs) {
  		html(delim);
-- 
1.7.9.5




More information about the CGit mailing list