summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcorvid <devnull@localhost>2014-07-23 19:02:56 +0000
committercorvid <devnull@localhost>2014-07-23 19:02:56 +0000
commitd26d459fb15a256f874af87035918f80f2e55f7f (patch)
treef6d99fc14354977ddee99ade52755b6a0a97509a
parentf1c7ad984e10e8ae28ffa4710f6d47a88200f771 (diff)
clarify situation with MENU element
-rw-r--r--src/html.cc11
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);
}
/*