mirror of
https://github.com/friendica/friendica
synced 2025-04-26 09:50:15 +00:00
Less greedy when replacing attachment elements
This commit is contained in:
parent
e41283faff
commit
8541e248bb
2 changed files with 3 additions and 3 deletions
|
@ -408,7 +408,7 @@ class BBCode
|
|||
*/
|
||||
public static function removeAttachment($body, $no_link_desc = false)
|
||||
{
|
||||
return preg_replace_callback("/\s*\[attachment (.*)\](.*?)\[\/attachment\]\s*/ism",
|
||||
return preg_replace_callback("/\s*\[attachment (.*?)\](.*?)\[\/attachment\]\s*/ism",
|
||||
function ($match) use ($no_link_desc) {
|
||||
$attach_data = self::getAttachmentData($match[0]);
|
||||
if (empty($attach_data['url'])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue