[php-src] PR #17815: Fix GH-17802: \Dom\HTMLDocument querySelector attribute name is case sensitive in HTML
| From: | nielsdos | Date: | Sat, 15 Feb 2025 12:54:04 +0000 |
| Subject: | [php-src] PR #17815: Fix GH-17802: \Dom\HTMLDocument querySelector attribute name is case sensitive in HTML | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-30794@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/17815
Author: nielsdos
According to https://html.spec.whatwg.org/#case-sensitivity-of-selectors,
the CSS selector attribute name must be converted to lowercase in HTML elements, and then compared
case-sensitive to the attribute name in the element. We implement this not by doing the explicit
conversion, but by a manual loop using a function that first converts the rhs characters to
lowercase and keeps the lhs characters the same, achieving the same effect.