We are now escaping many template fields

This commit is contained in:
Michael 2018-11-25 18:56:26 +00:00
parent ced4911c4a
commit 4f9f86e310
60 changed files with 472 additions and 476 deletions

View file

@ -85,7 +85,7 @@ class Contact extends BaseModule
/// @TODO Add nice spaces
$vcard_widget = Renderer::replaceMacros(Renderer::getMarkupTemplate('vcard-widget.tpl'), [
'$name' => htmlentities($contact['name']),
'$name' => $contact['name'],
'$photo' => $contact['photo'],
'$url' => Model\Contact::MagicLink($contact['url']),
'$addr' => defaults($contact, 'addr', ''),
@ -639,7 +639,7 @@ class Contact extends BaseModule
'$ffi_keyword_blacklist' => $contact['ffi_keyword_blacklist'],
'$ffi_keyword_blacklist' => ['ffi_keyword_blacklist', L10n::t('Blacklisted keywords'), $contact['ffi_keyword_blacklist'], L10n::t('Comma separated list of keywords that should not be converted to hashtags, when "Fetch information and keywords" is selected')],
'$photo' => $contact['photo'],
'$name' => htmlentities($contact['name']),
'$name' => $contact['name'],
'$dir_icon' => $dir_icon,
'$sparkle' => $sparkle,
'$url' => $url,
@ -1033,14 +1033,14 @@ class Contact extends BaseModule
'alt_text' => $alt_text,
'dir_icon' => $dir_icon,
'thumb' => ProxyUtils::proxifyUrl($rr['thumb'], false, ProxyUtils::SIZE_THUMB),
'name' => htmlentities($rr['name']),
'username' => htmlentities($rr['name']),
'name' => $rr['name'],
'username' => $rr['name'],
'account_type' => Model\Contact::getAccountType($rr),
'sparkle' => $sparkle,
'itemurl' => defaults($rr, 'addr', $rr['url']),
'url' => $url,
'network' => ContactSelector::networkToName($rr['network'], $rr['url']),
'nick' => htmlentities($rr['nick']),
'nick' => $rr['nick'],
];
}

View file

@ -213,7 +213,7 @@ class Post extends BaseObject
$filer = (($conv->getProfileOwner() == local_user() && ($item['uid'] != 0)) ? L10n::t("save to folder") : false);
$profile_name = htmlentities($item['author-name']);
$profile_name = $item['author-name'];
if (!empty($item['author-link']) && empty($item['author-name'])) {
$profile_name = $item['author-link'];
}
@ -377,7 +377,7 @@ class Post extends BaseObject
'isevent' => $isevent,
'attend' => $attend,
'linktitle' => L10n::t('View %s\'s profile @ %s', $profile_name, $item['author-link']),
'olinktitle' => L10n::t('View %s\'s profile @ %s', htmlentities($this->getOwnerName()), $item['owner-link']),
'olinktitle' => L10n::t('View %s\'s profile @ %s', $this->getOwnerName(), $item['owner-link']),
'to' => L10n::t('to'),
'via' => L10n::t('via'),
'wall' => L10n::t('Wall-to-Wall'),
@ -399,7 +399,7 @@ class Post extends BaseObject
'shiny' => $shiny,
'owner_url' => $this->getOwnerUrl(),
'owner_photo' => $a->removeBaseURL(ProxyUtils::proxifyUrl($item['owner-avatar'], false, ProxyUtils::SIZE_THUMB)),
'owner_name' => htmlentities($owner_name_e),
'owner_name' => $owner_name_e,
'plink' => Item::getPlink($item),
'edpost' => $edpost,
'isstarred' => $isstarred,