List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH] more & fixes
@ 2012-09-26 16:26 william.bell
  2012-09-27  4:22 ` william.bell
  0 siblings, 1 reply; 5+ messages in thread
From: william.bell @ 2012-09-26 16:26 UTC (permalink / raw)


 From ebf0b5b020c25b5d25b8416379f2980740d89882 Mon Sep 17 00:00:00 2001
From: William Bell <william.bell at frog.za.net>
Date: Wed, 26 Sep 2012 18:21:10 +0200
Subject: [PATCH] more &amp; fixes

---
  ui-shared.c |    6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ui-shared.c b/ui-shared.c
index ddbf632..18def4c 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





^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] more &amp; fixes
  2012-09-26 16:26 [PATCH] more &amp; fixes william.bell
@ 2012-09-27  4:22 ` william.bell
  2012-10-08 21:42   ` Jason
  0 siblings, 1 reply; 5+ messages in thread
From: william.bell @ 2012-09-27  4:22 UTC (permalink / raw)


that is supposed to be "&amp;" &_amp;

seems it rendered it as a plain &

On 26/09/2012 18:26, William Bell wrote:
>  From ebf0b5b020c25b5d25b8416379f2980740d89882 Mon Sep 17 00:00:00 2001
> From: William Bell <william.bell at frog.za.net>
> Date: Wed, 26 Sep 2012 18:21:10 +0200
> Subject: [PATCH] more &amp; fixes
>
> ---
>   ui-shared.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/ui-shared.c b/ui-shared.c
> index ddbf632..18def4c 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);




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] more &amp; fixes
  2012-09-27  4:22 ` william.bell
@ 2012-10-08 21:42   ` Jason
  2012-10-09 18:38     ` william.bell
  0 siblings, 1 reply; 5+ messages in thread
From: Jason @ 2012-10-08 21:42 UTC (permalink / raw)


Hi William,

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

Thanks,
Jason




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] more &amp; fixes
  2012-10-08 21:42   ` Jason
@ 2012-10-09 18:38     ` william.bell
  2012-10-09 18:48       ` Jason
  0 siblings, 1 reply; 5+ messages in thread
From: william.bell @ 2012-10-09 18:38 UTC (permalink / raw)




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




^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] more &amp; fixes
  2012-10-09 18:38     ` william.bell
@ 2012-10-09 18:48       ` Jason
  0 siblings, 0 replies; 5+ messages in thread
From: Jason @ 2012-10-09 18:48 UTC (permalink / raw)


On Tue, Oct 9, 2012 at 8:38 PM, William Bell <william.bell at frog.za.net> wrote:
> This includes a patch of all of the ampersand fixes that I could find.

Great. I added a couple more to your original patch. Could you confirm
that these are valid and I'm not making some error:
http://git.zx2c4.com/cgit/commit/?h=wb/htmlentities

Thanks a bunch,
Jason




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-10-09 18:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-26 16:26 [PATCH] more &amp; fixes william.bell
2012-09-27  4:22 ` william.bell
2012-10-08 21:42   ` Jason
2012-10-09 18:38     ` william.bell
2012-10-09 18:48       ` Jason

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).