X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Factivityobject.php;h=c957933d04bff8c2e11ba75552e58faeaabe4b81;hb=1acc7d66c63e0b9f794791e3a2e2b0f60bc2ebb1;hp=677a48197fd9e0e6ff10ee0a14b4e532109c8f7c;hpb=f0d905112ede6e45594b6ceceea3a6af4d9954f9;p=quix0rs-gnu-social.git diff --git a/lib/activityobject.php b/lib/activityobject.php index 677a48197f..c957933d04 100644 --- a/lib/activityobject.php +++ b/lib/activityobject.php @@ -168,7 +168,6 @@ class ActivityObject ActivityObject::MEDIA_DESCRIPTION, Activity::MEDIA ); - } } @@ -204,7 +203,7 @@ class ActivityObject $title = ActivityUtils::childHtmlContent($element, self::TITLE); - $this->title = html_entity_decode(strip_tags($title)); + $this->title = html_entity_decode(strip_tags($title), ENT_QUOTES, 'UTF-8'); $this->source = $this->_getSource($element); @@ -418,7 +417,6 @@ class ActivityObject ); foreach ($sizes as $size) { - $alink = null; $avatar = $profile->getAvatar($size); @@ -430,6 +428,17 @@ class ActivityObject $alink->height = $size; $alink->width = $size; $alink->url = Avatar::defaultImage($size); + + if ($size == AVATAR_PROFILE_SIZE) { + // Hack for Twitter import: we don't have a 96x96 image, + // but we do have a 73x73 image. For now, fake it with that. + $avatar = $profile->getAvatar(73); + if ($avatar) { + $alink = AvatarLink::fromAvatar($avatar); + $alink->height= $size; + $alink->width = $size; + } + } } $object->avatarLinks[] = $alink;