WordPress.org

Make WordPress Core

Ticket #43357: #.patch

File #.patch, 1.0 KB (added by arena, 18 months ago)

fix

  • wp-includes/feed.php

     
    693693
    694694        $feed = new SimplePie();
    695695
    696         $feed->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' );
    697         // We must manually overwrite $feed->sanitize because SimplePie's
    698         // constructor sets it before we have a chance to set the sanitization class
    699         $feed->sanitize = new WP_SimplePie_Sanitize_KSES();
     696        $feed->registry->register( 'Sanitize', 'WP_SimplePie_Sanitize_KSES', true );
     697        $feed->registry->register( 'Cache', 'WP_Feed_Cache', true );
     698        $feed->registry->register( 'File', 'WP_SimplePie_File', true );
    700699
    701         $feed->set_cache_class( 'WP_Feed_Cache' );
    702         $feed->set_file_class( 'WP_SimplePie_File' );
    703 
    704700        $feed->set_feed_url( $url );
    705701        /** This filter is documented in wp-includes/class-wp-feed-cache-transient.php */
    706702        $feed->set_cache_duration( apply_filters( 'wp_feed_cache_transient_lifetime', 12 * HOUR_IN_SECONDS, $url ) );