Formatting: Don't run `wp_targeted_link_rel()` on entirely serialized content.
Props birgire, elliotcondon. Fixes #46402. Built from https://develop.svn.wordpress.org/trunk@45408 git-svn-id: http://core.svn.wordpress.org/trunk@45219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ca028cfc4c
commit
a81dfbdf0e
|
@ -3040,7 +3040,9 @@ function wp_rel_nofollow_callback( $matches ) {
|
||||||
function wp_targeted_link_rel( $text ) {
|
function wp_targeted_link_rel( $text ) {
|
||||||
// Don't run (more expensive) regex if no links with targets.
|
// Don't run (more expensive) regex if no links with targets.
|
||||||
if ( stripos( $text, 'target' ) !== false && stripos( $text, '<a ' ) !== false ) {
|
if ( stripos( $text, 'target' ) !== false && stripos( $text, '<a ' ) !== false ) {
|
||||||
$text = preg_replace_callback( '|<a\s([^>]*target\s*=[^>]*)>|i', 'wp_targeted_link_rel_callback', $text );
|
if ( ! is_serialized( $text ) ) {
|
||||||
|
$text = preg_replace_callback( '|<a\s([^>]*target\s*=[^>]*)>|i', 'wp_targeted_link_rel_callback', $text );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $text;
|
return $text;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-alpha-45407';
|
$wp_version = '5.3-alpha-45408';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue