mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
Do SimplePie sanitization with wp_kses_post() rather than DOMDocument, which cannot be guaranteed to be available.
Overrides SimplePie_Sanitize with WP_SimplePie_Sanitize_KSES. props markjaquith, rmccue. see #21990. git-svn-id: https://develop.svn.wordpress.org/trunk@22811 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -528,6 +528,11 @@ function fetch_feed($url) {
|
||||
|
||||
$feed = new SimplePie();
|
||||
|
||||
$feed->set_sanitize_class( 'WP_SimplePie_Sanitize_KSES' );
|
||||
// We must manually overwrite $feed->sanitize because SimplePie's
|
||||
// constructor sets it before we have a chance to set the sanitization class
|
||||
$feed->sanitize = new WP_SimplePie_Sanitize_KSES();
|
||||
|
||||
$feed->set_cache_class( 'WP_Feed_Cache' );
|
||||
$feed->set_file_class( 'WP_SimplePie_File' );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user