Making WordPress.org

Changeset 10260


Ignore:
Timestamp:
09/16/2020 02:18:49 AM (4 years ago)
Author:
dd32
Message:

o2: <title> is not a tag we want to ever see on o2. Remove it since we also apply this to the comment contents.

Fixes #5439.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-allow-more-html-in-comments.php

    r6421 r10260  
    2727
    2828    add_filter( 'force_filtered_html_on_import', __NAMESPACE__ . '\force_filtered_html_on_import', 10000 );
     29
     30    add_filter( 'wp_kses_allowed_html', __NAMESPACE__ . '\wp_kses_allowed_html' );
    2931}
    3032add_action( 'setup_theme', __NAMESPACE__ . '\init' );
     
    6466    return $force;
    6567}
     68
     69/**
     70 * Remove <title> as a valid post tag, this should never actually be used and breaks o2.
     71 */
     72function wp_kses_allowed_html( $tags ) {
     73    if ( is_array( $tags ) ) {
     74        unset( $tags['title'] );
     75    }
     76
     77    return $tags;
     78}
Note: See TracChangeset for help on using the changeset viewer.