diff --git a/plugins/content/loadmodule/loadmodule.php b/plugins/content/loadmodule/loadmodule.php index 7e166cd532387..0ec033f951ddb 100644 --- a/plugins/content/loadmodule/loadmodule.php +++ b/plugins/content/loadmodule/loadmodule.php @@ -113,7 +113,7 @@ public function onContentPrepare($context, &$article, &$params, $page = 0) $output = $this->_loadmod($module, $name, $stylemod); // We should replace only first occurrence in order to allow positions with the same name to regenerate their content: - $article->text = preg_replace(addcslashes("|$matchmod[0]|", '()'), addcslashes($output, '\\$'), $article->text, 1); + $article->text = preg_replace('|' . preg_quote($matchmod[0]) . '|', addcslashes($output, '\\$'), $article->text, 1); $stylemod = $this->params->def('style', 'none'); } }