mirror of
https://github.com/friendica/friendica
synced 2025-04-26 05:50:11 +00:00
Fixes issue 7914: Reshares got crumbled
This commit is contained in:
parent
1de81716b3
commit
23cdc9cec8
3 changed files with 6 additions and 7 deletions
|
@ -953,12 +953,11 @@ class BBCode extends BaseObject
|
|||
public static function convertShare($text, callable $callback)
|
||||
{
|
||||
$return = preg_replace_callback(
|
||||
"/(.*?)\[share(.*?)\](.*?)\[\/share\]/ism",
|
||||
"/(.*?)\[share(.*?)\](.*)\[\/share\]/ism",
|
||||
function ($match) use ($callback) {
|
||||
$attribute_string = $match[2];
|
||||
|
||||
$attributes = [];
|
||||
foreach(['author', 'profile', 'avatar', 'link', 'posted'] as $field) {
|
||||
foreach (['author', 'profile', 'avatar', 'link', 'posted'] as $field) {
|
||||
preg_match("/$field=(['\"])(.+?)\\1/ism", $attribute_string, $matches);
|
||||
$attributes[$field] = html_entity_decode($matches[2] ?? '', ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue