* Double quotes in man.cgi search output
@ 2016-08-30 7:43 Anthony J. Bentley
2016-09-11 23:57 ` Ingo Schwarze
0 siblings, 1 reply; 2+ messages in thread
From: Anthony J. Bentley @ 2016-08-30 7:43 UTC (permalink / raw)
To: tech
Hi,
html_putchar() escapes double quotes incorrectly: the entity should be
", not "e;.
https://www.w3.org/TR/html5/syntax.html#named-character-references
For example:
http://man.openbsd.org/?query=Nd~%22&apropos=1
In Firefox, each "e; is rendered as: "e;
because Firefox believes what the author meant to write was "e;
Index: cgi.c
===================================================================
RCS file: /cvs/src/usr.bin/mandoc/cgi.c,v
retrieving revision 1.77
diff -u -p -r1.77 cgi.c
--- cgi.c 18 Aug 2016 00:44:37 -0000 1.77
+++ cgi.c 30 Aug 2016 07:34:28 -0000
@@ -136,7 +136,7 @@ html_putchar(char c)
switch (c) {
case ('"'):
- printf(""e;");
+ printf(""");
break;
case ('&'):
printf("&");
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Double quotes in man.cgi search output
2016-08-30 7:43 Double quotes in man.cgi search output Anthony J. Bentley
@ 2016-09-11 23:57 ` Ingo Schwarze
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Schwarze @ 2016-09-11 23:57 UTC (permalink / raw)
To: Anthony J. Bentley; +Cc: tech
Hi Anthony,
Anthony J. Bentley wrote on Tue, Aug 30, 2016 at 01:43:59AM -0600:
> html_putchar() escapes double quotes incorrectly: the entity should be
> ", not "e;.
>
> https://www.w3.org/TR/html5/syntax.html#named-character-references
>
> For example:
>
> http://man.openbsd.org/?query=Nd~%22&apropos=1
>
> In Firefox, each "e; is rendered as: "e;
> because Firefox believes what the author meant to write was "e;
OK schwarze@
Ingo
> Index: cgi.c
> ===================================================================
> RCS file: /cvs/src/usr.bin/mandoc/cgi.c,v
> retrieving revision 1.77
> diff -u -p -r1.77 cgi.c
> --- cgi.c 18 Aug 2016 00:44:37 -0000 1.77
> +++ cgi.c 30 Aug 2016 07:34:28 -0000
> @@ -136,7 +136,7 @@ html_putchar(char c)
>
> switch (c) {
> case ('"'):
> - printf(""e;");
> + printf(""");
> break;
> case ('&'):
> printf("&");
--
To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-11 23:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 7:43 Double quotes in man.cgi search output Anthony J. Bentley
2016-09-11 23:57 ` Ingo Schwarze
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).