Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 49049c9b57fd89ca87f478dd8e01324bb6f32389
      
https://github.com/WebKit/WebKit/commit/49049c9b57fd89ca87f478dd8e01324bb6f32389
  Author: Chris Dumez <[email protected]>
  Date:   2026-03-28 (Sat, 28 Mar 2026)

  Changed paths:
    M Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp
    M Tools/TestWebKitAPI/Tests/WebCore/HTMLParserIdioms.cpp

  Log Message:
  -----------
  Allow underscore in attribute names in the HTML fast path parser
https://bugs.webkit.org/show_bug.cgi?id=310961

Reviewed by Anne van Kesteren.

isValidAttributeNameChar() only accepted alphanumeric characters and '-',
rejecting '_' which is valid per the HTML spec. This caused unnecessary
fallback to the slow parser for attributes like data_value="...".

Test: Tools/TestWebKitAPI/Tests/WebCore/HTMLParserIdioms.cpp

* Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp:
(WebCore::isValidAttributeNameChar):
* Tools/TestWebKitAPI/Tests/WebCore/HTMLParserIdioms.cpp:
(TestWebKitAPI::TEST(WebCoreHTMLParser, FastPathAttributeNameWithUnderscore)):

Canonical link: https://commits.webkit.org/310152@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to