From cb7ea89c8ed5fb6dc5180551af5f4ae9538b3482 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Fri, 22 Apr 2016 07:08:27 +0000 Subject: [PATCH] Smilies: Move `convert_smilies` to happen later in the `the_content` filter. In particular, we want it to occur after shortcode handling. The smiley conversion routine doesn't have any concept of shortcode structure, so may inadvertantly replace a smiley with HTML inside a shortcode attribute, which will cause the shortcode to not be parsed correctly. Props Unyson for the initial suggested fix. Fixes #36306. Built from https://develop.svn.wordpress.org/trunk@37298 git-svn-id: http://core.svn.wordpress.org/trunk@37264 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-filters.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/default-filters.php b/wp-includes/default-filters.php index 2ae86d88f5..5f5464e03f 100644 --- a/wp-includes/default-filters.php +++ b/wp-includes/default-filters.php @@ -130,7 +130,7 @@ add_filter( 'the_title', 'convert_chars' ); add_filter( 'the_title', 'trim' ); add_filter( 'the_content', 'wptexturize' ); -add_filter( 'the_content', 'convert_smilies' ); +add_filter( 'the_content', 'convert_smilies', 20 ); add_filter( 'the_content', 'wpautop' ); add_filter( 'the_content', 'shortcode_unautop' ); add_filter( 'the_content', 'prepend_attachment' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index c86e90d34e..fb2ae83bba 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37297'; +$wp_version = '4.6-alpha-37298'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.