Skip to:
Content

bbPress.org

Changeset 4740


Ignore:
Timestamp:
01/31/2013 04:26:09 AM (10 years ago)
Author:
johnjamesjacoby
Message:

Reorder topic and reply content code filters to fix entity issue inside code blocks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core/filters.php

    r4737 r4740  
    9191add_filter( 'bbp_edit_reply_pre_title',   'wp_filter_kses'  );
    9292add_filter( 'bbp_edit_topic_pre_title',   'wp_filter_kses'  );
     93
     94// Code filters on output (hooked in early for plugin compatibility)
     95add_filter( 'bbp_get_reply_content', 'bbp_encode_bad', 2 );
     96add_filter( 'bbp_get_reply_content', 'bbp_code_trick', 3 );
     97add_filter( 'bbp_get_topic_content', 'bbp_encode_bad', 2 );
     98add_filter( 'bbp_get_topic_content', 'bbp_code_trick', 3 );
     99
     100// Code filters on input
     101add_filter( 'bbp_new_reply_pre_content',  'bbp_code_trick_reverse' );
     102add_filter( 'bbp_edit_reply_pre_content', 'bbp_code_trick_reverse' );
     103add_filter( 'bbp_new_topic_pre_content',  'bbp_code_trick_reverse' );
     104add_filter( 'bbp_edit_topic_pre_content', 'bbp_code_trick_reverse' );
    93105
    94106// balanceTags, wp_filter_kses and wp_rel_nofollow on new/edit topic/reply text
     
    152164add_filter( 'bbp_get_topic_post_count',     'bbp_number_format', 10 );
    153165
    154 // Code filters on input
    155 add_filter( 'bbp_new_reply_pre_content',  'bbp_code_trick_reverse' );
    156 add_filter( 'bbp_edit_reply_pre_content', 'bbp_code_trick_reverse' );
    157 add_filter( 'bbp_new_topic_pre_content',  'bbp_code_trick_reverse' );
    158 add_filter( 'bbp_edit_topic_pre_content', 'bbp_code_trick_reverse' );
    159 
    160 // Code filters on output (hooked in early for plugin compatibility)
    161 add_filter( 'bbp_get_reply_content', 'bbp_code_trick', 4 );
    162 add_filter( 'bbp_get_reply_content', 'bbp_encode_bad', 6 );
    163 add_filter( 'bbp_get_topic_content', 'bbp_code_trick', 4 );
    164 add_filter( 'bbp_get_topic_content', 'bbp_encode_bad', 6 );
    165 
    166166// Run wp_kses_data on topic/reply content in admin section
    167167if ( is_admin() ) {
Note: See TracChangeset for help on using the changeset viewer.