diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php
index f2faf20f43..6b2ee98d7a 100644
--- a/phpBB/includes/functions_content.php
+++ b/phpBB/includes/functions_content.php
@@ -739,7 +739,7 @@ function smiley_text($text, $force_option = false)
else
{
$root_path = (defined('PHPBB_USE_BOARD_URL_PATH') && PHPBB_USE_BOARD_URL_PATH) ? generate_board_url() . '/' : $phpbb_root_path;
- return preg_replace('#
', $text);
+ return preg_replace('# \/><!\-\- s\1 \-\->#', '<img class=)