aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2012-11-07 19:31:30 +0000
committercorvid <corvid@lavabit.com>2012-11-07 19:31:30 +0000
commitba6e6d20b80992dd79f325e68fedfd6094998d88 (patch)
tree544cddb1b8a5c972b519c4e30b2ecbeb90bac904 /src
parent6f7abb000d2f81274dadefe8319faedf457283fd (diff)
apos character entity for xhtml
Diffstat (limited to 'src')
-rw-r--r--src/html.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/html.cc b/src/html.cc
index 059371a8..259a989e 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -944,14 +944,18 @@ static int Html_parse_entity(DilloHtml *html, const char *token,
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)