mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
oembed: implement a max oembed size which defaults to 1MB and do not try to oembed text previews
This commit is contained in:
@@ -860,7 +860,7 @@ class Enotify {
|
||||
// convert this logic into a json array just like the system notifications
|
||||
|
||||
$who = (($item['verb'] === ACTIVITY_SHARE) ? 'owner' : 'author');
|
||||
$body = html2plain(bbcode($item['body'], ['drop_media']), 75, true);
|
||||
$body = html2plain(bbcode($item['body'], ['drop_media' => true, 'tryoembed' => false]), 75, true);
|
||||
if ($body) {
|
||||
$body = htmlentities($body, ENT_QUOTES, 'UTF-8', false);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ class Messages {
|
||||
}
|
||||
|
||||
if (!$summary) {
|
||||
$summary = html2plain(bbcode($item['body'], ['drop_media' => true]), 75, true);
|
||||
$summary = html2plain(bbcode($item['body'], ['drop_media' => true, 'tryoembed' => false]), 75, true);
|
||||
if ($summary) {
|
||||
$summary = htmlentities($summary, ENT_QUOTES, 'UTF-8', false);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class Notes {
|
||||
|
||||
$o = replace_macros($tpl, array(
|
||||
'$text' => $text,
|
||||
'$html' => bbcode($text),
|
||||
'$html' => bbcode($text, ['tryoembed' => false]),
|
||||
'$app' => ((isset($arr['app'])) ? true : false),
|
||||
'$hidden' => ((isset($arr['hidden'])) ? true : false),
|
||||
'$strings' => [
|
||||
|
||||
Reference in New Issue
Block a user