| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index 9abe48baba00b2f629cdbe1758e65f34139e8011..5d0debd550512bc11a009959013fed7e063669e7 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -805,6 +805,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);
|
| }
|
|
|
|
|