WordPress.org

Make WordPress Core


Ignore:
Timestamp:
08/09/2015 08:48:02 PM (6 years ago)
Author:
ocean90
Message:

Shortcodes: Trim whitespace after sanitizing the shortcode output.

props Ankit K Gupta, obenland, miqrogroove.
fixes #33259.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/shortcodes.php

    r33594 r33600  
    400400                    // Sanitize the shortcode output using KSES.
    401401                    $new_attr = wp_kses_one_attr( $new_attr, $elname );
    402                     if ( '' !== $new_attr ) {
     402                    if ( '' !== trim( $new_attr ) ) {
    403403                        // The shortcode is safe to use now.
    404404                        $attr = $new_attr;
Note: See TracChangeset for help on using the changeset viewer.