' and xhtml

"corvid" <[email protected]>
Newsgroups gmane.comp.web.dillo.devel
Message-ID <20121105235306.GA26255@local>
Jeremy wanted to add apos a long time ago, and it didn't happen then,
but we did give in and accept application/xhtml+xml--let's see--two
years ago now, so I wonder whether conditions have changed.

_______________________________________________
Dillo-dev mailing list
[email protected]
http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
apos.diff (text/plain, 996 B)
diff -r 286f066d13e7 src/html.cc
--- a/src/html.cc	Mon Nov 05 23:05:43 2012 +0100
+++ b/src/html.cc	Mon Nov 05 23:47:30 2012 +0000
@@ -944,14 +944,18 @@
       c = *s;
       *s = 0;
 
-      if ((i = Html_entity_search(tok)) == -1) {
-         if ((html->DocType == DT_HTML && html->DocTypeVersion == 4.01f) ||
-             html->DocType == DT_XHTML)
-            BUG_MSG("undefined character entity '%s'\n", tok);
-         isocode = -3;
-      } else
+      if ((i = Html_entity_search(tok)) >= 0) {
          isocode = Entities[i].isocode;
-
+      } else {
+         if (html->DocType == DT_XHTML && !strcmp(tok, "apos")) {
+            isocode = 0x27;
+         } else {
+            if ((html->DocType == DT_HTML && html->DocTypeVersion == 4.01f) ||
+                html->DocType == DT_XHTML)
+               BUG_MSG("undefined character entity '%s'\n", tok);
+            isocode = -3;
+         }
+      }
       if (c == ';')
          s++;
       else if (prefs.show_extra_warnings)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.