diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index bb4fc5dbae..d6ed40bdf8 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -2749,7 +2749,7 @@ function get_preg_expression($mode)
return array(
'#.*?#',
'#.*?#',
- '#.*?#',
+ '#(.*?)#',
'#
$message = str_replace($match, $replace, $message);
$match = get_preg_expression('bbcode_htm');
- $replace = array('\1', '\1', '\2', '\1', '', '');
+ $replace = array('\1', '\1', '\3', '\1', '', '');
$message = preg_replace($match, $replace, $message);
}
)