Issue with SimplePie Santize
-
I’ve spotted an issue in the version of SimplePie that’s included in WordPress 3.5 in that the sanitizer is not getting set. The net result of this is that things like videos and objects are unintentionally stripped out of the content. There is also a change of syntax in that the “set_xxx_class” is depreciated in the this version of SimplePie.
In the function import_blog($blogID) you will find the code that sets these classes.
$feed = new SimplePie(); $feed->set_item_class('WP_SimplePie_Blog_Item'); $feed->set_sanitize_class('Blogger_Importer_Sanitize'); $feed->set_raw_data($response); $feed->init();
Replace this with:
$feed = new SimplePie(); $reg = $feed->get_registry(); $reg->register('Sanitize','Blogger_Importer_Sanitize'); $reg->register('Item','WP_SimplePie_Blog_Item'); $feed->sanitize = $reg->create('Sanitize'); $feed->set_raw_data($response); $feed->init();
If you actually want the unitentionally behaviour or want to be even more agressive in filtering out the data you can add iframe and object to the list at the top of blogger-importer-sanitize.php
https://www.ads-software.com/extend/plugins/blogger-importer/
- The topic ‘Issue with SimplePie Santize’ is closed to new replies.