[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

ap at apple.com ap at apple.com
Wed Apr 7 23:17:37 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 1b6aea3d07e6cf0b438486d1a2219b099f0e5cbb
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sun Nov 1 20:04:11 2009 +0000

            Reviewed by John Sullivan.
    
            https://bugs.webkit.org/show_bug.cgi?id=30982
            createHTMLDocument doesn't escape ampersand and less-than in title
    
            Test: fast/dom/DOMImplementation/createHTMLDocument-title.html
    
            * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createHTMLDocument):
            Set document title after creating the document, avoiding parser intricacies.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50389 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 8c8063a..df0a093 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-31  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by John Sullivan.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30982
+        createHTMLDocument doesn't escape ampersand and less-than in title
+
+        * fast/dom/DOMImplementation/createHTMLDocument-title-expected.txt: Added.
+        * fast/dom/DOMImplementation/createHTMLDocument-title.html: Added.
+
 2009-11-01  Hironori Bono  <hbono at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title-expected.txt b/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title-expected.txt
new file mode 100644
index 0000000..712f2f1
--- /dev/null
+++ b/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title-expected.txt
@@ -0,0 +1,5 @@
+Test for a bug 30982: createHTMLDocument doesn't escape ampersand and less-than in title.
+
+Should say PASS:
+
+PASS
diff --git a/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title.html b/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title.html
new file mode 100644
index 0000000..5e4a153
--- /dev/null
+++ b/LayoutTests/fast/dom/DOMImplementation/createHTMLDocument-title.html
@@ -0,0 +1,9 @@
+<p>Test for a <href="https://bugs.webkit.org/show_bug.cgi?id=30982">bug 30982</a>: createHTMLDocument doesn't escape ampersand and less-than in title.</p>
+<p>Should say PASS:</p>
+<script>
+if (window.layoutTestController)
+    layoutTestController.dumpAsText();
+
+var result = document.implementation.createHTMLDocument('foo</title>').title;
+document.write((result == 'foo</title>') ? "PASS" : ("FAIL. Title is:<xmp>" + result + "</xmp>"));
+</script>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 08692ba..02b8f31 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-31  Alexey Proskuryakov  <ap at apple.com>
+
+        Reviewed by John Sullivan.
+
+        https://bugs.webkit.org/show_bug.cgi?id=30982
+        createHTMLDocument doesn't escape ampersand and less-than in title
+
+        Test: fast/dom/DOMImplementation/createHTMLDocument-title.html
+
+        * dom/DOMImplementation.cpp: (WebCore::DOMImplementation::createHTMLDocument):
+        Set document title after creating the document, avoiding parser intricacies.
+
 2009-11-01  Keishi Hattori  <casey.hattori at gmail.com>
 
         Reviewed by Timothy Hatcher.
diff --git a/WebCore/dom/DOMImplementation.cpp b/WebCore/dom/DOMImplementation.cpp
index 59b9703..f7c8242 100644
--- a/WebCore/dom/DOMImplementation.cpp
+++ b/WebCore/dom/DOMImplementation.cpp
@@ -305,7 +305,8 @@ PassRefPtr<HTMLDocument> DOMImplementation::createHTMLDocument(const String& tit
 {
     RefPtr<HTMLDocument> d = HTMLDocument::create(0);
     d->open();
-    d->write("<!doctype html><html><head><title>" + title + "</title></head><body></body></html>");
+    d->write("<!doctype html><html><body></body></html>");
+    d->setTitle(title);
     return d.release();
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list