Index: Source/core/xml/DOMParser.cpp |
diff --git a/Source/core/xml/DOMParser.cpp b/Source/core/xml/DOMParser.cpp |
index ed2770cf66ee3a6d4fbca5b2c93104d75a2a986d..a60572e2e5cfeace4f48d641b94b827eae2924dc 100644 |
--- a/Source/core/xml/DOMParser.cpp |
+++ b/Source/core/xml/DOMParser.cpp |
@@ -25,20 +25,9 @@ |
namespace blink { |
-PassRefPtrWillBeRawPtr<Document> DOMParser::parseFromString(const String& str, const String& contentType, ExceptionState& exceptionState) |
+PassRefPtrWillBeRawPtr<Document> DOMParser::parseFromString(const String& str, const String& type) |
{ |
- // HTML5 is very explicit about which types we're allowed to support here: |
- // http://domparsing.spec.whatwg.org/#the-domparser-interface |
- if (contentType != "text/html" |
- && contentType != "text/xml" |
- && contentType != "application/xml" |
- && contentType != "application/xhtml+xml" |
- && contentType != "image/svg+xml") { |
- exceptionState.throwTypeError("Unsupported mime-type specified."); |
- return nullptr; |
- } |
- |
- RefPtrWillBeRawPtr<Document> doc = DOMImplementation::createDocument(contentType, 0, KURL(), false); |
+ RefPtrWillBeRawPtr<Document> doc = DOMImplementation::createDocument(type, 0, KURL(), false); |
doc->setContent(str); |
return doc.release(); |
} |