List for cgit developers and users
 help / color / mirror / Atom feed
From: william.bell at frog.za.net (William Bell)
Subject: [PATCH] more & fixes
Date: Tue, 09 Oct 2012 20:38:40 +0200	[thread overview]
Message-ID: <50746F30.6050202@frog.za.net> (raw)
In-Reply-To: <CAHmME9qEgbrS5dfXraDFD=HVeCTBmWeAarJ_s_q6jqSGpuY7Yg@mail.gmail.com>



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




  reply	other threads:[~2012-10-09 18:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26 16:26 william.bell
2012-09-27  4:22 ` william.bell
2012-10-08 21:42   ` Jason
2012-10-09 18:38     ` william.bell [this message]
2012-10-09 18:48       ` Jason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50746F30.6050202@frog.za.net \
    --to=cgit@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).