diff --git a/lib/parser.js b/lib/parser.js index 313974dae..171f600f6 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -1796,6 +1796,10 @@ function rpStartTagInBody(p, token) { p._insertElement(token, NS.HTML); } +function menuitemStartTagInBody(p, token) { + p._appendElement(token, NS.HTML); +} + function mathStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); adjustTokenMathMLAttrs(token); @@ -2020,7 +2024,7 @@ function startTagInBody(p, token) { case 8: if (tn === $.BASEFONT || tn === $.MENUITEM) - startTagInHead(p, token); + menuitemStartTagInBody(p, token); else if (tn === $.FRAMESET) framesetStartTagInBody(p, token); diff --git a/package.json b/package.json index 006a860ac..3c606832f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "parse5", "description": "Fast full-featured HTML parser for Node. Based on WHATWG HTML5 specification.", - "version": "0.6.0", + "version": "0.6.1", "author": "Ivan Nikulin (ifaaan@gmail.com, https://github.com/inikulin)", "keywords": [ "html",