mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/10117] Make smilies to be correctly parsed within unicode text.
PHPBB3-10117
This commit is contained in:
parent
f392f55d9b
commit
25ae46b8df
1 changed files with 2 additions and 2 deletions
|
@ -1332,7 +1332,7 @@ class parse_message extends bbcode_firstpass
|
|||
{
|
||||
if ($max_smilies)
|
||||
{
|
||||
$num_matches = preg_match_all('#(?<=^|[\n .])(?:' . implode('|', $match) . ')(?![^<>]*>)#', $this->message, $matches);
|
||||
$num_matches = preg_match_all('#(?<=^|[\n .])(?:' . implode('|', $match) . ')(?![^<>]*>)#u', $this->message, $matches);
|
||||
unset($matches);
|
||||
|
||||
if ($num_matches !== false && $num_matches > $max_smilies)
|
||||
|
@ -1343,7 +1343,7 @@ class parse_message extends bbcode_firstpass
|
|||
}
|
||||
|
||||
// Make sure the delimiter # is added in front and at the end of every element within $match
|
||||
$this->message = trim(preg_replace(explode(chr(0), '#(?<=^|[\n .])' . implode('(?![^<>]*>)#' . chr(0) . '#(?<=^|[\n .])', $match) . '(?![^<>]*>)#'), $replace, $this->message));
|
||||
$this->message = trim(preg_replace(explode(chr(0), '#(?<=^|[\n .])' . implode('(?![^<>]*>)#u' . chr(0) . '#(?<=^|[\n .])', $match) . '(?![^<>]*>)#'), $replace, $this->message));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue