From 8d5af49e49eeaaf2b14cbe6b487d808835a2539c Mon Sep 17 00:00:00 2001 From: hellofromTonya Date: Tue, 16 Nov 2021 19:42:01 +0000 Subject: [PATCH] Formatting: Add additional support for single and nestable tags in `force_balance_tags()`. Adds `track` and `wbr` support for single tags. Adds `article`, `aside`, `details`, `figure`, and `section` for nestable tags. Updates tests. Follow-up to [5805], [21828], [45929]. Props glendaviesnz, costdev, talldanwp, ramonopoly, sergeybiryukov. Fixes #50225. Built from https://develop.svn.wordpress.org/trunk@52188 git-svn-id: http://core.svn.wordpress.org/trunk@51780 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/formatting.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/formatting.php b/wp-includes/formatting.php index 38a4a113a9..c524b06928 100644 --- a/wp-includes/formatting.php +++ b/wp-includes/formatting.php @@ -2514,9 +2514,9 @@ function force_balance_tags( $text ) { $tagqueue = ''; $newtext = ''; // Known single-entity/self-closing tags. - $single_tags = array( 'area', 'base', 'basefont', 'br', 'col', 'command', 'embed', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param', 'source' ); + $single_tags = array( 'area', 'base', 'basefont', 'br', 'col', 'command', 'embed', 'frame', 'hr', 'img', 'input', 'isindex', 'link', 'meta', 'param', 'source', 'track', 'wbr' ); // Tags that can be immediately nested within themselves. - $nestable_tags = array( 'blockquote', 'div', 'object', 'q', 'span' ); + $nestable_tags = array( 'article', 'aside', 'blockquote', 'details', 'div', 'figure', 'object', 'q', 'section', 'span' ); // WP bug fix for comments - in case you REALLY meant to type '< !--'. $text = str_replace( '< !--', '< !--', $text ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 30d868fe2d..2df31031a7 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52187'; +$wp_version = '5.9-alpha-52188'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.