Commit d56cbd983c for wordpress.org
commit d56cbd983c27e74332740e5f2bc9fcfa7caf7abd
Author: SergeyBiryukov <sergeybiryukov@git.wordpress.org>
Date: Tue Oct 13 23:05:49 2026 +0000
Feeds: Use the namespaced SimplePie HTML attribute pattern.
`WP_SimplePie_Sanitize_KSES::sanitize()` still used the deprecated `SIMPLEPIE_PCRE_HTML_ATTRIBUTE` constant. r59141 switched all other SimplePie constants in this method to their namespaced equivalents, but this one was missed. SimplePie has deprecated it since 1.7.0.
**Why this is safe**
SimplePie defines the legacy constant as an alias of the class constant (`define( 'SIMPLEPIE_PCRE_HTML_ATTRIBUTE', NamespacedSimplePie::PCRE_HTML_ATTRIBUTE )` in `SimplePie/library/SimplePie.php`), so the regex is identical. The namespaced class is already used three lines above and below. This is the only `SIMPLEPIE_*` constant used in Core outside the bundled library.
Follow-up to r59141.
Props Soean.
Fixes #66301.
Built from https://develop.svn.wordpress.org/trunk@64338
git-svn-id: http://core.svn.wordpress.org/trunk@63488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/class-wp-simplepie-sanitize-kses.php b/wp-includes/class-wp-simplepie-sanitize-kses.php
index 09f7cfbd5d..32ddf7bb95 100644
--- a/wp-includes/class-wp-simplepie-sanitize-kses.php
+++ b/wp-includes/class-wp-simplepie-sanitize-kses.php
@@ -39,7 +39,7 @@ class WP_SimplePie_Sanitize_KSES extends SimplePie\Sanitize {
public function sanitize( $data, $type, $base = '' ) {
$data = trim( $data );
if ( $type & SimplePie\SimplePie::CONSTRUCT_MAYBE_HTML ) {
- if ( preg_match( '/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*' . SIMPLEPIE_PCRE_HTML_ATTRIBUTE . '>)/', $data ) ) {
+ if ( preg_match( '/(&(#(x[0-9a-fA-F]+|[0-9]+)|[a-zA-Z0-9]+)|<\/[A-Za-z][^\x09\x0A\x0B\x0C\x0D\x20\x2F\x3E]*' . SimplePie\SimplePie::PCRE_HTML_ATTRIBUTE . '>)/', $data ) ) {
$type |= SimplePie\SimplePie::CONSTRUCT_HTML;
} else {
$type |= SimplePie\SimplePie::CONSTRUCT_TEXT;
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 660bcfab2d..c75b826da6 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-alpha-64337';
+$wp_version = '7.2-alpha-64338';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.