WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/22/2016 07:07:03 AM (4 years ago)
Author:
pento
Message:

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.

File:
1 edited

Legend:

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

    r36915 r37298  
    131131
    132132add_filter( 'the_content', 'wptexturize'                       );
    133 add_filter( 'the_content', 'convert_smilies'                  );
     133add_filter( 'the_content', 'convert_smilies',               20 );
    134134add_filter( 'the_content', 'wpautop'                           );
    135135add_filter( 'the_content', 'shortcode_unautop'                 );
Note: See TracChangeset for help on using the changeset viewer.