Skip to content

Commit

Permalink
Merge pull request #82 from iMattPro/emoji-issue
Browse files Browse the repository at this point in the history
Decode Emoji
  • Loading branch information
iMattPro authored Sep 30, 2024
2 parents 0ad3b30 + bf40978 commit 10ba38e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ucp/controller/webpush.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,10 @@ public function notification(): JsonResponse

$notification_data = $this->get_user_notifications();

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

return new JsonResponse($data);
}
Expand Down

0 comments on commit 10ba38e

Please sign in to comment.