diff options
author | rxu <rxu@mail.ru> | 2011-04-03 15:28:00 +0800 |
---|---|---|
committer | rxu <rxu@mail.ru> | 2011-04-03 15:28:00 +0800 |
commit | b8adad0d48845540083519651bf9befb6cffaceb (patch) | |
tree | 0304fb5a9f14773b3a3ca6c3ff66ec022972de7b /phpBB/includes/message_parser.php | |
parent | 25ae46b8df36f040f7f3adc1e4aebb4041d79964 (diff) | |
download | forums-b8adad0d48845540083519651bf9befb6cffaceb.tar forums-b8adad0d48845540083519651bf9befb6cffaceb.tar.gz forums-b8adad0d48845540083519651bf9befb6cffaceb.tar.bz2 forums-b8adad0d48845540083519651bf9befb6cffaceb.tar.xz forums-b8adad0d48845540083519651bf9befb6cffaceb.zip |
[ticket/10117] Add one more missed 'u' modifier, add code comment
PHPBB3-10117
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r-- | phpBB/includes/message_parser.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 7c12321d51..5a7dd9d11e 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1332,6 +1332,8 @@ class parse_message extends bbcode_firstpass { if ($max_smilies) { + // 'u' modifier has been added to correctly parse smilies within unicode strings + // For details: http://tracker.phpbb.com/browse/PHPBB3-10117 $num_matches = preg_match_all('#(?<=^|[\n .])(?:' . implode('|', $match) . ')(?![^<>]*>)#u', $this->message, $matches); unset($matches); @@ -1343,7 +1345,10 @@ 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('(?![^<>]*>)#u' . chr(0) . '#(?<=^|[\n .])', $match) . '(?![^<>]*>)#'), $replace, $this->message)); + // 'u' modifier has been added to correctly parse smilies within unicode strings + // For details: http://tracker.phpbb.com/browse/PHPBB3-10117 + + $this->message = trim(preg_replace(explode(chr(0), '#(?<=^|[\n .])' . implode('(?![^<>]*>)#u' . chr(0) . '#(?<=^|[\n .])', $match) . '(?![^<>]*>)#u'), $replace, $this->message)); } } |