mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-25 04:24:31 +02:00
Trim emoticon preg
git-svn-id: file:///svn/phpbb/trunk@4490 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@ -645,8 +645,8 @@ class parse_message
|
||||
|
||||
do
|
||||
{
|
||||
$match[] = '#(' . preg_quote($row['code'], '#') . ')#';
|
||||
// $match[] = "#(?<=.\W|\W.|^\W)" . preg_quote($row['code'], '#') . "(?=.\W|\W.|\W$)#";
|
||||
// $match[] = '#(' . preg_quote($row['code'], '#') . ')#';
|
||||
$match[] = "#(?<=.\W|\W.|^\W)" . preg_quote($row['code'], '#') . "(?=.\W|\W.|\W$)#";
|
||||
$replace[] = '<!-- s' . $row['code'] . ' --><img src="{SMILE_PATH}/' . $row['smile_url'] . '" border="0" alt="' . $row['emoticon'] . '" title="' . $row['emoticon'] . '" /><!-- s' . $row['code'] . ' -->';
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
@ -662,7 +662,7 @@ class parse_message
|
||||
}
|
||||
}
|
||||
|
||||
$this->message = preg_replace($match, $replace, ' ' . $this->message . ' ');
|
||||
$this->message = trim(preg_replace($match, $replace, ' ' . $this->message . ' '));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user