Merge pull request #11031 from MrPetovan/bug/9720-share-preg_replace
Escape dollar sign in replace string to prevent placeholder replacement in Model\Item::addShareDataFromOriginal
This commit is contained in:
commit
b03b1fe367
1 changed files with 1 additions and 1 deletions
|
@ -3354,7 +3354,7 @@ class Item
|
||||||
$body = $shared_item['body'];
|
$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']);
|
unset($shared_item['body']);
|
||||||
|
|
||||||
return array_merge($item, $shared_item);
|
return array_merge($item, $shared_item);
|
||||||
|
|
Loading…
Reference in a new issue