mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-26 08:55:13 +00:00
An optimization pass on the HTML API left a bug in the `matches()` method, whereby it would falsely detect a tag name match if the found tag were a lexical subset of the requested tag. This occurred because of the use of `substr_compare()` without checking that the outer lengths matched. This patch resolves the bug by adding the length check. Developed in https://github.com/wordpress/wordpress-develop/pull/7189 Discussed in https://core.trac.wordpress.org/ticket/61545 Follow-up to [58613]. Props dmsnell, westonruter. See #61545. Built from https://develop.svn.wordpress.org/trunk@58893 git-svn-id: http://core.svn.wordpress.org/trunk@58289 1a063a9b-81f0-0310-95a4-ce76da25c4cd