Shortcodes: Trim whitespace after sanitizing the shortcode output.

props Ankit K Gupta, obenland, miqrogroove.
fixes #33259.
Built from https://develop.svn.wordpress.org/trunk@33600


git-svn-id: http://core.svn.wordpress.org/trunk@33567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling 2015-08-09 20:49:25 +00:00
parent 45b8634605
commit e9e88d0b4b
2 changed files with 2 additions and 2 deletions

View File

@ -399,7 +399,7 @@ function do_shortcodes_in_html_tags( $content, $ignore_html ) {
if ( $count > 0 ) { if ( $count > 0 ) {
// Sanitize the shortcode output using KSES. // Sanitize the shortcode output using KSES.
$new_attr = wp_kses_one_attr( $new_attr, $elname ); $new_attr = wp_kses_one_attr( $new_attr, $elname );
if ( '' !== $new_attr ) { if ( '' !== trim( $new_attr ) ) {
// The shortcode is safe to use now. // The shortcode is safe to use now.
$attr = $new_attr; $attr = $new_attr;
} }

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.3-RC2-33599'; $wp_version = '4.3-RC2-33600';
/** /**
* 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.