mirror of
https://github.com/friendica/friendica
synced 2025-04-26 13:50:11 +00:00
Use constants for the BBCode modes
This commit is contained in:
parent
7b8178e046
commit
0cf517ad76
9 changed files with 48 additions and 52 deletions
|
@ -644,7 +644,7 @@ class Processor
|
|||
$title = $matches[3];
|
||||
}
|
||||
|
||||
$title = trim(HTML::toPlaintext(BBCode::convert($title, false, 2, true), 0));
|
||||
$title = trim(HTML::toPlaintext(BBCode::convert($title, false, BBCode::API, true), 0));
|
||||
|
||||
if (strlen($title) > 20) {
|
||||
$title = substr($title, 0, 20) . '...';
|
||||
|
|
|
@ -1215,7 +1215,7 @@ class Transmitter
|
|||
{
|
||||
$event = [];
|
||||
$event['name'] = $item['event-summary'];
|
||||
$event['content'] = BBCode::convert($item['event-desc'], false, 9);
|
||||
$event['content'] = BBCode::convert($item['event-desc'], false, BBCode::ACTIVITYPUB);
|
||||
$event['startTime'] = DateTimeFormat::utc($item['event-start'] . '+00:00', DateTimeFormat::ATOM);
|
||||
|
||||
if (!$item['event-nofinish']) {
|
||||
|
@ -1309,7 +1309,7 @@ class Transmitter
|
|||
$regexp = "/[@!]\[url\=([^\[\]]*)\].*?\[\/url\]/ism";
|
||||
$body = preg_replace_callback($regexp, ['self', 'mentionCallback'], $body);
|
||||
|
||||
$data['content'] = BBCode::convert($body, false, 9);
|
||||
$data['content'] = BBCode::convert($body, false, BBCode::ACTIVITYPUB);
|
||||
}
|
||||
|
||||
// The regular "content" field does contain a minimized HTML. This is done since systems like
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue