summaryrefslogtreecommitdiff
path: root/src/html.cc
diff options
context:
space:
mode:
authorcorvid <devnull@localhost>2016-06-14 21:53:44 +0000
committercorvid <devnull@localhost>2016-06-14 21:53:44 +0000
commitec006280a40b7f293889ee739af17bef948d6dd5 (patch)
treef18e7ed96d826165a9922a6c228d97c42a236a0d /src/html.cc
parenta36394887f6fc101ff407d7dc126504a59e899f5 (diff)
BUG_MSG can give false positives with HTML5
Diffstat (limited to 'src/html.cc')
-rw-r--r--src/html.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/html.cc b/src/html.cc
index 1e693d6d..09dab3e2 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -3005,8 +3005,13 @@ static void Html_tag_open_li(DilloHtml *html, const char *tag, int tagsize)
int *list_number;
const char *attrbuf;
- if (S_TOP(html)->list_type == HTML_LIST_NONE)
+ if (S_TOP(html)->list_type == HTML_LIST_NONE &&
+ !(html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)) {
+ /* In WHATWG's HTML5 and W3C's HTML 5.1, LI can appear within MENUs
+ * of the toolbar type.
+ */
BUG_MSG("<li> outside <ul> or <ol>.");
+ }
html->InFlags |= IN_LI;