Skip to content

Commit 10ba38e

Browse files
authored
Merge pull request #82 from iMattPro/emoji-issue
Decode Emoji
2 parents 0ad3b30 + bf40978 commit 10ba38e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ucp/controller/webpush.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ public function notification(): JsonResponse
105105

106106
$notification_data = $this->get_user_notifications();
107107

108-
// Decode and return data if everything is fine
108+
// Decode and return data if everything is fine; update url paths and decode message emoji
109109
$data = json_decode($notification_data, true);
110110
$data['url'] = isset($data['url']) ? $this->path_helper->update_web_root_path($data['url']) : '';
111+
$data['text'] = isset($data['text']) ? html_entity_decode($data['text'], ENT_NOQUOTES, 'UTF-8') : '';
111112

112113
return new JsonResponse($data);
113114
}

0 commit comments

Comments
 (0)