aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-05-11 15:39:31 +0200
committerMario <mario@mariovavti.com>2019-05-11 15:39:31 +0200
commita5cd0061c53737992bdd1938b57b0363418bd7ef (patch)
tree6cda5ecad42212ea900b861ed9740dad277d0f3e /Zotlabs/Lib/Activity.php
parent630e3903fadf6de98ba9f911bb1101650d495f97 (diff)
parentd7026fe36b2febd71329e8d9512a4305ae8c05c6 (diff)
downloadvolse-hubzilla-a5cd0061c53737992bdd1938b57b0363418bd7ef.tar.gz
volse-hubzilla-a5cd0061c53737992bdd1938b57b0363418bd7ef.tar.bz2
volse-hubzilla-a5cd0061c53737992bdd1938b57b0363418bd7ef.zip
Merge branch 'dev' into 'dev'
use 'cache' flag to bbcode() on content destined for Zot6. We've seen rendered... See merge request hubzilla/core!1644
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 9d11cc201..232d845c7 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -154,7 +154,7 @@ class Activity {
'type' => 'Image',
'id' => $x['id'],
'name' => $x['title'],
- 'content' => bbcode($x['body']),
+ 'content' => bbcode($x['body'], [ 'cache' => true ]),
'source' => [ 'mediaType' => 'text/bbcode', 'content' => $x['body'] ],
'published' => datetime_convert('UTC','UTC',$x['created'],ATOM_TIME),
'updated' => datetime_convert('UTC','UTC', $x['edited'],ATOM_TIME),
@@ -184,11 +184,11 @@ class Activity {
$y = [
'type' => 'Event',
'id' => z_root() . '/event/' . $ev['event_hash'],
- 'summary' => bbcode($ev['summary']),
+ 'summary' => bbcode($ev['summary'], [ 'cache' => true ]),
// RFC3339 Section 4.3
'startTime' => (($ev['adjust']) ? datetime_convert('UTC','UTC',$ev['dtstart'], ATOM_TIME) : datetime_convert('UTC','UTC',$ev['dtstart'],'Y-m-d\\TH:i:s-00:00')),
- 'content' => bbcode($ev['description']),
- 'location' => [ 'type' => 'Place', 'content' => bbcode($ev['location']) ],
+ 'content' => bbcode($ev['description'], [ 'cache' => true ]),
+ 'location' => [ 'type' => 'Place', 'content' => bbcode($ev['location'], [ 'cache' => true ]) ],
'source' => [ 'content' => format_event_bbcode($ev), 'mediaType' => 'text/bbcode' ],
'actor' => $actor,
];
@@ -315,10 +315,10 @@ class Activity {
if($i['mimetype'] === 'text/bbcode') {
if($i['title'])
- $ret['name'] = bbcode($i['title']);
+ $ret['name'] = bbcode($i['title'], [ 'cache' => true ]);
if($i['summary'])
- $ret['summary'] = bbcode($i['summary']);
- $ret['content'] = bbcode($i['body']);
+ $ret['summary'] = bbcode($i['summary'], [ 'cache' => true ]);
+ $ret['content'] = bbcode($i['body'], [ 'cache' => true ]);
$ret['source'] = [ 'content' => $i['body'], 'mediaType' => 'text/bbcode' ];
}
@@ -476,14 +476,14 @@ class Activity {
$ret['id'] = ((strpos($i['mid'],'http') === 0) ? $i['mid'] : z_root() . '/activity/' . urlencode($i['mid']));
if($i['title'])
- $ret['name'] = html2plain(bbcode($i['title']));
+ $ret['name'] = html2plain(bbcode($i['title'], [ 'cache' => true ]));
if($i['summary'])
- $ret['summary'] = bbcode($i['summary']);
+ $ret['summary'] = bbcode($i['summary'], [ 'cache' => true ]);
if($ret['type'] === 'Announce') {
$tmp = preg_replace('/\[share(.*?)\[\/share\]/ism',EMPTY_STR, $i['body']);
- $ret['content'] = bbcode($tmp);
+ $ret['content'] = bbcode($tmp, [ 'cache' => true ]);
$ret['source'] = [
'content' => $i['body'],
'mediaType' => 'text/bbcode'