Prevent expandTags to be performed on existing links in Module\Api\Mastodon\Statuses
- We never need to expand tags inside of an already existing BBCode url tag
This commit is contained in:
parent
8628bd5228
commit
5a93bb6eff
|
@ -63,7 +63,10 @@ class Statuses extends BaseApi
|
|||
// The imput is defined as text. So we can use Markdown for some enhancements
|
||||
$body = Markdown::toBBCode($request['status']);
|
||||
|
||||
$body = BBCode::expandTags($body);
|
||||
// Avoids potential double expansion of existing links
|
||||
$body = BBCode::performWithEscapedTags($body, ['url'], function ($body) {
|
||||
return BBCode::expandTags($body);
|
||||
});
|
||||
|
||||
$item = [];
|
||||
$item['uid'] = $uid;
|
||||
|
|
Loading…
Reference in New Issue
Block a user