aboutsummaryrefslogtreecommitdiff
path: root/src/html.cc
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
commit7b26dbbb7cbb0a69b47c42e4204545e0f845e4f5 (patch)
treeb947cfe16394e57f85979afd34a1925e2ab739fa /src/html.cc
parent441e8001147e2f84bf40b231561f5bf2928e0b3d (diff)
clarify situation with MENU element
Diffstat (limited to 'src/html.cc')
-rw-r--r--src/html.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/html.cc b/src/html.cc
index 9fe8715f..9eafbe5a 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -2880,7 +2880,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);
}
/*