Merge pull request #4216 from MrPetovan/bug/4173-fix-oembed-iframe-url

Fix link attachment display
This commit is contained in:
Michael Vogel 2018-01-13 00:45:32 +01:00 committed by GitHub
commit 70942202c0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 74 additions and 55 deletions

View file

@ -131,14 +131,12 @@ class OEmbed
$j->embedurl = $embedurl;
// If fetching information doesn't work, then improve via internal functions
if (($j->type == "error") || ($no_rich_type && ($j->type == "rich"))) {
if ($no_rich_type && ($j->type == "rich")) {
$data = ParseUrl::getSiteinfoCached($embedurl, true, false);
$j->type = $data["type"];
if ($j->type == "photo") {
$j->url = $data["url"];
//$j->width = $data["images"][0]["width"];
//$j->height = $data["images"][0]["height"];
}
if (isset($data["title"])) {