diff options
author | corvid <corvid@lavabit.com> | 2012-11-07 19:31:30 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2012-11-07 19:31:30 +0000 |
commit | ba6e6d20b80992dd79f325e68fedfd6094998d88 (patch) | |
tree | 544cddb1b8a5c972b519c4e30b2ecbeb90bac904 /src/html.cc | |
parent | 6f7abb000d2f81274dadefe8319faedf457283fd (diff) |
apos character entity for xhtml
Diffstat (limited to 'src/html.cc')
-rw-r--r-- | src/html.cc | 18 |
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) |