correctly parse HTML4 nested inline elements (#861)
[html-minifier.git] / src / htmlparser.js
index 74695a0..7b54b9d 100644 (file)
@@ -270,7 +270,7 @@ function HTMLParser(html, handler) {
       parseEndTag('', lastTag);
     }
 
-    if (!handler.html5) {
+    if (!handler.html5 && !inline(tagName)) {
       while (lastTag && inline(lastTag)) {
         parseEndTag('', lastTag);
       }