mirror of
https://github.com/friendica/friendica
synced 2025-04-25 02:30:11 +00:00
The "share" handling is improved
This commit is contained in:
parent
4930737cc4
commit
f54a886a5e
14 changed files with 74 additions and 111 deletions
|
@ -1023,6 +1023,7 @@ class BBCode
|
|||
{
|
||||
DI::profiler()->startRecording('rendering');
|
||||
if (preg_match('~(.*?)\[share](.*)\[/share]~ism', $text, $matches)) {
|
||||
DI::profiler()->stopRecording();
|
||||
return [
|
||||
'author' => '',
|
||||
'profile' => '',
|
||||
|
@ -1093,12 +1094,7 @@ class BBCode
|
|||
*/
|
||||
public static function removeSharedData(string $body): string
|
||||
{
|
||||
return BBCode::convertShare(
|
||||
$body,
|
||||
function (array $attributes) {
|
||||
return '';
|
||||
}
|
||||
);
|
||||
return preg_replace("/\s*\[share .*?\].*?\[\/share\]\s*/ism", '', $body);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue