forked from GNUsocial/gnu-social
purify oembed html
This commit is contained in:
@@ -158,7 +158,15 @@ class oEmbedHelper
|
|||||||
if(isset($key)) {
|
if(isset($key)) {
|
||||||
$params['key'] = common_config('oembed','apikey');
|
$params['key'] = common_config('oembed','apikey');
|
||||||
}
|
}
|
||||||
return HTTPClient::quickGetJson($api, $params);
|
|
||||||
|
$oembed_data = HTTPClient::quickGetJson($api, $params);
|
||||||
|
|
||||||
|
// purify html
|
||||||
|
if(isset($oembed_data->html)) {
|
||||||
|
$oembed_data->html = common_purify($oembed_data->html);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $oembed_data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -211,4 +219,4 @@ class oEmbedHelper_DiscoveryException extends oEmbedHelper_Exception
|
|||||||
{
|
{
|
||||||
return parent::__construct('No oEmbed discovery data.', 0, $previous);
|
return parent::__construct('No oEmbed discovery data.', 0, $previous);
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user