From f8bd8914da82845d98e4454ef6aa7d4b6ba93873 Mon Sep 17 00:00:00 2001 From: audrasjb Date: Wed, 28 Sep 2022 14:59:10 +0000 Subject: [PATCH] Script Loader: Prevent double space between attributes in `WP_Styles` class. This changeset prevents `` elements to display a double space between attributes when no `title` attribute is provided. Props elten, audrasjb, whaze, SergeyBiryukov. Fixes #56675. Built from https://develop.svn.wordpress.org/trunk@54348 git-svn-id: http://core.svn.wordpress.org/trunk@53907 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-styles.php | 6 +++--- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-styles.php b/wp-includes/class-wp-styles.php index b318d0fc17..b14ad7cbef 100644 --- a/wp-includes/class-wp-styles.php +++ b/wp-includes/class-wp-styles.php @@ -224,10 +224,10 @@ class WP_Styles extends WP_Dependencies { } $rel = isset( $obj->extra['alt'] ) && $obj->extra['alt'] ? 'alternate stylesheet' : 'stylesheet'; - $title = isset( $obj->extra['title'] ) ? sprintf( "title='%s'", esc_attr( $obj->extra['title'] ) ) : ''; + $title = isset( $obj->extra['title'] ) ? sprintf( " title='%s'", esc_attr( $obj->extra['title'] ) ) : ''; $tag = sprintf( - "\n", + "\n", $rel, $handle, $title, @@ -259,7 +259,7 @@ class WP_Styles extends WP_Dependencies { } $rtl_tag = sprintf( - "\n", + "\n", $rel, $handle, $title, diff --git a/wp-includes/version.php b/wp-includes/version.php index a005302de0..fe3884d653 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.1-beta2-54347'; +$wp_version = '6.1-beta2-54348'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.