forumfive
forumfive copied to clipboard
Allow for embedding of pictures from all websites
Currently embedding only works for youtube and vimeo. I guess that was implemented to work for videos only. A simple check while puryfing would help:
if($html->nodeName != 'img' && $attribute->name == 'src') {
$domain = parse_url($value, PHP_URL_HOST);
// Only EVER allow embeds from Youtube / Vimeo
if( ! $domain OR ! in_array($domain, static::$video_sites)) {
$html->removeAttributeNode($attribute);
}
continue;
}