We do not parse the body in discover_by_url(), so no need to preserve iframes in SimplePie.

This commit is contained in:
Klaus Weidenbach 2017-04-15 13:46:13 +02:00
parent b6459e6172
commit 7d5e7bf6c8

View File

@ -1049,7 +1049,6 @@ function email_send($addr, $subject, $headers, $item) {
* @return boolean
*/
function discover_by_url($url, $arr = null) {
require_once('library/HTML5/Parser.php');
$x = scrape_feed($url);
if(! $x) {
@ -1092,12 +1091,6 @@ function discover_by_url($url, $arr = null) {
// Don't try and parse an empty string
$feed->set_raw_data(($xml) ? $xml : '<?xml version="1.0" encoding="utf-8" ?><xml></xml>');
// We can preserve iframes because we will strip them in the purifier after
// checking for supported video sources.
$strip_htmltags = $feed->strip_htmltags;
array_splice($strip_htmltags, array_search('iframe', $strip_htmltags), 1);
$feed->strip_htmltags($strip_htmltags);
$feed->init();
if($feed->error())
logger('scrape_feed: Error parsing XML: ' . $feed->error());
@ -1856,6 +1849,7 @@ function scrape_vcard($url) {
* @return array
*/
function scrape_feed($url) {
require_once('library/HTML5/Parser.php');
$ret = array();
$level = 0;