diff --git a/modules/filter/filter.api.php b/modules/filter/filter.api.php index 2901eb9..266eab7 100644 --- a/modules/filter/filter.api.php +++ b/modules/filter/filter.api.php @@ -202,7 +202,7 @@ function callback_filter_settings($form, &$form_state, $filter, $format, $defaul */ function callback_filter_prepare($text, $filter, $format, $langcode, $cache, $cache_id) { // Escape and tags. - $text = preg_replace('|(.+?)|se', "[codefilter_code]$1[/codefilter_code]", $text); + $text = preg_replace_callback('|(.+?)|', "[codefilter_code]$1[/codefilter_code]", $text); return $text; } @@ -234,7 +234,7 @@ function callback_filter_prepare($text, $filter, $format, $langcode, $cache, $ca * @ingroup callbacks */ function callback_filter_process($text, $filter, $format, $langcode, $cache, $cache_id) { - $text = preg_replace('|\[codefilter_code\](.+?)\[/codefilter_code\]|se', "
$1
", $text); + $text = preg_replace_callback('|\[codefilter_code\](.+?)\[/codefilter_code\]|', "
$1
", $text); return $text; }