Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 76f8c0b5884b64dc4e0e891f309192449b8ec57f
      
https://github.com/WebKit/WebKit/commit/76f8c0b5884b64dc4e0e891f309192449b8ec57f
  Author: Chris Dumez <[email protected]>
  Date:   2026-04-21 (Tue, 21 Apr 2026)

  Changed paths:
    M Source/WebCore/html/parser/HTMLEntityParser.cpp
    M Source/WebCore/html/parser/HTMLEntitySearch.cpp
    M Source/WebCore/html/parser/create-html-entity-table

  Log Message:
  -----------
  HTMLEntityParser: minor code quality improvements
https://bugs.webkit.org/show_bug.cgi?id=312874

Reviewed by Anne van Kesteren.

Two small improvements to the HTML entity parser:
  - In makeEntity(char32_t), replace `character <= 0` with `!character`
    since char32_t is unsigned, making the intent clearer.
  - Bound the span returned by HTMLEntityTableEntry::nameCharacters() to
    nameLengthExcludingSemicolon characters instead of extending to the end
    of the entire string storage. Update HTMLEntitySearch::compare() to use
    the span's size for bounds checking instead of accessing the bitfield
    directly.

* Source/WebCore/html/parser/HTMLEntityParser.cpp:
(WebCore::makeEntity):
* Source/WebCore/html/parser/HTMLEntitySearch.cpp:
(WebCore::HTMLEntitySearch::compare const):
* Source/WebCore/html/parser/create-html-entity-table:

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



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

Reply via email to