browser compatibility: use numeric entity for '

' is a XHTML entity, browsers such as links, w3m, lynx and dillo
don't support it.
This commit is contained in:
Hiltjo Posthuma 2017-04-15 12:56:29 +02:00
parent bba55b6bbc
commit ab3fdd7043
2 changed files with 2 additions and 2 deletions

View 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);

View file

@ -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);