diff options
-rw-r--r-- | src/html.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/html.cc b/src/html.cc index c5fa470c..096437c6 100644 --- a/src/html.cc +++ b/src/html.cc @@ -2877,7 +2877,16 @@ static void Html_tag_open_dir(DilloHtml *html, const char *tag, int tagsize) */ static void Html_tag_open_menu(DilloHtml *html, const char *tag, int tagsize) { - Html_tag_open_dir(html, tag, tagsize); + /* In another bit of ridiculous mess from the HTML5 world, the menu + * element, which was deprecated in HTML4: + * - does not appear at all in W3C's HTML5 spec + * - appears in WHATWG's HTML5 doc and the W3C's 5.1 draft, where it + * means something totally different than it did in the old days + * (now it's for popup menus and toolbar menus rather than being a + * sort of list). + */ + if (!(html->DocType == DT_HTML && html->DocTypeVersion >= 5.0f)) + Html_tag_open_dir(html, tag, tagsize); } /* |