| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 9dfe1b6aff51b606a7eef0ba47b3a8d2309763d5..06fc17552b892b38b1e884123c5e740b08181cdb 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -806,6 +806,10 @@ PassRefPtr<CDATASection> Document::createCDATASection(const String& data, Except
|
| es.throwDOMException(NotSupportedError);
|
| return 0;
|
| }
|
| + if (data.find("]]>") != WTF::notFound) {
|
| + es.throwDOMException(InvalidCharacterError, "String cannot contain ']]>' since that is the end delimiter of a CData section.");
|
| + return 0;
|
| + }
|
| return CDATASection::create(this, data);
|
| }
|
|
|
|
|