createElement should not lowercase non-ASCII characters
[WebKit-https.git] / Source / WebCore / dom / Document.cpp
index c724358..50dd968 100644 (file)
@@ -888,6 +888,9 @@ RefPtr<Element> Document::createElement(const AtomicString& name, ExceptionCode&
         return nullptr;
     }
 
+    if (isHTMLDocument())
+        return HTMLElementFactory::createElement(QualifiedName(nullAtom, name.convertToASCIILowercase(), xhtmlNamespaceURI), *this);
+
     if (isXHTMLDocument())
         return HTMLElementFactory::createElement(QualifiedName(nullAtom, name, xhtmlNamespaceURI), *this);