Reviewed by John.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Dec 2003 21:46:45 +0000 (21:46 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 10 Dec 2003 21:46:45 +0000 (21:46 +0000)
<rdar://problem/3505795>: loading invalid XML document crashes trying to create h1 element

* khtml/xml/dom_docimpl.cpp:
        (DocumentImpl::isValidName): include "0123456789" instead of
"0-9", it's not a regexp it's just a list of characters.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@5744 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog-2005-08-23
WebCore/khtml/xml/dom_docimpl.cpp

index 91e7256..e93639f 100644 (file)
@@ -2,6 +2,16 @@
 
         Reviewed by John.
 
+       <rdar://problem/3505795>: loading invalid XML document crashes trying to create h1 element
+        
+       * khtml/xml/dom_docimpl.cpp:
+        (DocumentImpl::isValidName): include "0123456789" instead of
+       "0-9", it's not a regexp it's just a list of characters.
+
+2003-12-09  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by John.
+
        <rdar://problem/3504155>: Safari fails XMLHttpRequest abort test
         
        * khtml/ecma/xmlhttprequest.cpp:
index 757d680..fd72d06 100644 (file)
@@ -2499,7 +2499,7 @@ void DocumentImpl::setDomain(const DOMString &newDomain, bool force /*=false*/)
 bool DocumentImpl::isValidName(const DOMString &name)
 {
     static const char validFirstCharacter[] = "ABCDEFGHIJKLMNOPQRSTUVWXZYabcdefghijklmnopqrstuvwxyz";
-    static const char validSubsequentCharacter[] = "ABCDEFGHIJKLMNOPQRSTUVWXZYabcdefghijklmnopqrstuvwxyz0-9-_:.";
+    static const char validSubsequentCharacter[] = "ABCDEFGHIJKLMNOPQRSTUVWXZYabcdefghijklmnopqrstuvwxyz0123456789-_:.";
     const unsigned length = name.length();
     if (length == 0)
         return false;