[webkit-changes] cvs commit: WebCore/khtml/html html_documentimpl.cpp

Vicki vicki at opensource.apple.com
Wed Oct 12 17:49:31 PDT 2005


vicki       05/10/12 17:49:30

  Modified:    .        ChangeLog
               khtml/html html_documentimpl.cpp
  Log:
          Reviewed by Hyatt.
  
  	- fix <rdar://problem/4288266> createElement does not validate names when called in an HTML document (4566)
  
          * khtml/html/html_documentimpl.cpp:
          (DOM::HTMLDocumentImpl::createElement):
  
  Revision  Changes    Path
  1.237     +9 -0      WebCore/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /cvs/root/WebCore/ChangeLog,v
  retrieving revision 1.236
  retrieving revision 1.237
  diff -u -r1.236 -r1.237
  --- ChangeLog	13 Oct 2005 00:35:40 -0000	1.236
  +++ ChangeLog	13 Oct 2005 00:49:25 -0000	1.237
  @@ -1,3 +1,12 @@
  +2005-10-12  Vicki Murley  <vicki at apple.com>
  +
  +        Reviewed by Hyatt.
  +
  +	- fix <rdar://problem/4288266> createElement does not validate names when called in an HTML document (4566)
  +
  +        * khtml/html/html_documentimpl.cpp:
  +        (DOM::HTMLDocumentImpl::createElement): 
  +
   2005-10-12  Beth Dakin  <bdakin at apple.com>
   
           Reviewed by Hyatt
  
  
  
  1.72      +4 -1      WebCore/khtml/html/html_documentimpl.cpp
  
  Index: html_documentimpl.cpp
  ===================================================================
  RCS file: /cvs/root/WebCore/khtml/html/html_documentimpl.cpp,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- html_documentimpl.cpp	3 Oct 2005 21:12:28 -0000	1.71
  +++ html_documentimpl.cpp	13 Oct 2005 00:49:29 -0000	1.72
  @@ -253,8 +253,11 @@
   
   ElementImpl *HTMLDocumentImpl::createElement(const DOMString &name, int &exceptioncode)
   {
  -    // Do not check name validity.  Other browsers don't, and it takes time.
       DOMString lowerName(name.lower());
  +    if (!isValidName(lowerName)) {
  +        exceptioncode = DOMException::INVALID_CHARACTER_ERR;
  +        return 0;
  +    }
       return HTMLElementFactory::createHTMLElement(AtomicString(lowerName), this, 0, false);
   }
   
  
  
  



More information about the webkit-changes mailing list