mirror of
https://github.com/humhub/humhub.git
synced 2025-01-16 21:58:17 +01:00
Fix #3365: Legacy richtext emojis not parsed in richtext preview
This commit is contained in:
parent
85ade5aed2
commit
6a3f500f51
@ -8,6 +8,7 @@ HumHub Change Log
|
||||
|
||||
- Fix #3359: Weekly summary e-mails are not sent in default configuration
|
||||
- Fix: Space module permission configuration of non installed space modules visible in permission grid
|
||||
- Fix #3365: Legacy richtext emojis not parsed in richtext preview
|
||||
|
||||
|
||||
1.3.7 (October 23, 2018)
|
||||
|
@ -189,11 +189,12 @@ class ProsemirrorRichText extends AbstractRichText
|
||||
|
||||
protected function toUTF8Emoji($text)
|
||||
{
|
||||
return preg_replace_callback('/:(([A-Za-z0-9])+):/', function($match) {
|
||||
// Note the ; was used in the legacy editor
|
||||
return preg_replace_callback('/[:|;](([A-Za-z0-9])+)[:|;]/', function($match) {
|
||||
$result = $match[0];
|
||||
|
||||
if(isset($match[1])) {
|
||||
$result = array_key_exists($match[1], EmojiMap::MAP) ? EmojiMap::MAP[$match[1]] : $result;
|
||||
$result = array_key_exists(strtolower($match[1]), EmojiMap::MAP) ? EmojiMap::MAP[strtolower($match[1])] : $result;
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user