From: Hypolite Petovan Date: Fri, 26 Nov 2021 17:38:34 +0000 (-0500) Subject: Escape dollar sign in replace string to prevent placeholder replacement in Model... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1c5aef06859e6f8feab2e92b9ddd1ae64bac99bb;p=friendica.git Escape dollar sign in replace string to prevent placeholder replacement in Model\Item::addShareDataFromOriginal --- diff --git a/src/Model/Item.php b/src/Model/Item.php index 923d72c11b..0a3ed1ddc5 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -3354,7 +3354,7 @@ class Item $body = $shared_item['body']; } - $item['body'] = preg_replace("/\[share ([^\[\]]*)\].*\[\/share\]/ism", '[share $1]' . $body . '[/share]', $item['body']); + $item['body'] = preg_replace("/\[share ([^\[\]]*)\].*\[\/share\]/ism", '[share $1]' . str_replace('$', '\$', $body) . '[/share]', $item['body']); unset($shared_item['body']); return array_merge($item, $shared_item);