| Index: third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
|
| diff --git a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
|
| index dc67a7045594120c3170fee3de37923296482e5c..fecf34a6a8124854ab27f3ba90ea651354d316bf 100644
|
| --- a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
|
| +++ b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
|
| @@ -1271,8 +1271,15 @@ void XMLDocumentParser::startDocument(const String& version,
|
| return;
|
| }
|
|
|
| - if (!version.isNull())
|
| + // Silently ignore XML version mismatch in the prologue.
|
| + // https://www.w3.org/TR/xml/#sec-prolog-dtd note says:
|
| + // "When an XML 1.0 processor encounters a document that specifies a 1.x
|
| + // version number other than '1.0', it will process it as a 1.0 document. This
|
| + // means that an XML 1.0 processor will accept 1.x documents provided they do
|
| + // not use any non-1.0 features."
|
| + if (!version.isNull() && supportsXMLVersion(version)) {
|
| document()->setXMLVersion(version, ASSERT_NO_EXCEPTION);
|
| + }
|
| if (standalone != StandaloneUnspecified)
|
| document()->setXMLStandalone(standaloneInfo == StandaloneYes,
|
| ASSERT_NO_EXCEPTION);
|
|
|