]> git.armaanb.net Git - stagit.git/commitdiff
browser compatibility: use numeric entity for '
authorHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 15 Apr 2017 10:56:29 +0000 (12:56 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 15 Apr 2017 10:56:29 +0000 (12:56 +0200)
&apos; is a XHTML entity, browsers such as links, w3m, lynx and dillo
don't support it.

stagit-index.c
stagit.c

index 067dc30fd6cab577fa3439c5d3c0e8302e2cd05d..0a72b334d14a0f0e2f9ad664a584129271a8a59a 100644 (file)
@@ -47,7 +47,7 @@ xmlencode(FILE *fp, const char *s, size_t len)
                switch(*s) {
                case '<':  fputs("&lt;",   fp); break;
                case '>':  fputs("&gt;",   fp); break;
-               case '\'': fputs("&apos;", fp); break;
+               case '\'': fputs("&#39;" , fp); break;
                case '&':  fputs("&amp;",  fp); break;
                case '"':  fputs("&quot;", fp); break;
                default:   fputc(*s, fp);
index 089f15bffe7b01bf10f04344cdbafeabeae5b547..d9f66048f2fcc99675df668746d4ef11f6e50629 100644 (file)
--- a/stagit.c
+++ b/stagit.c
@@ -248,7 +248,7 @@ xmlencode(FILE *fp, const char *s, size_t len)
                switch(*s) {
                case '<':  fputs("&lt;",   fp); break;
                case '>':  fputs("&gt;",   fp); break;
-               case '\'': fputs("&apos;", fp); break;
+               case '\'': fputs("&#39;",  fp); break;
                case '&':  fputs("&amp;",  fp); break;
                case '"':  fputs("&quot;", fp); break;
                default:   fputc(*s, fp);