<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
{
if (!empty($siteinfo['images'])) {
array_walk($siteinfo['images'], function (&$image) use ($page_url) {
- $image = [];
// According to the specifications someone could place a picture url into the content field as well.
// But this doesn't seem to happen in the wild, so we don't cover it here.
if (!empty($image['url'])) {
$image['contenttype'] = $photodata['mime'];
unset($image['url']);
ksort($image);
+ } else {
+ $image = [];
}
+ } else {
+ $image = [];
}
});
array_walk_recursive($siteinfo, function (&$element) {
if (is_string($element)) {
- $element = html_entity_decode($element, ENT_COMPAT, 'UTF-8');
+ $element = trim(strip_tags(html_entity_decode($element, ENT_COMPAT, 'UTF-8')));
}
});