Escape dollar sign in replace string to prevent placeholder replacement in Model\Item::addShareDataFromOriginal
This commit is contained in:
parent
3d77fd5e29
commit
1c5aef0685
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue