File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -123,10 +123,9 @@ public function notification(): JsonResponse
123123
124124 $ notification_data = $ this ->get_user_notifications ();
125125
126- // Decode and return data if everything is fine; update url paths and decode message emoji
126+ // Decode and return data if everything is fine
127127 $ data = json_decode ($ notification_data , true );
128128 $ data ['url ' ] = isset ($ data ['url ' ]) ? $ this ->path_helper ->update_web_root_path ($ data ['url ' ]) : '' ;
129- $ data ['text ' ] = isset ($ data ['text ' ]) ? html_entity_decode ($ data ['text ' ], ENT_NOQUOTES , 'UTF-8 ' ) : '' ;
130129
131130 return new JsonResponse ($ data );
132131 }
@@ -234,8 +233,8 @@ private function get_notification_data(string $notification_data): string
234233
235234 return json_encode ([
236235 'heading ' => $ this ->config ['sitename ' ],
237- 'title ' => strip_tags ($ notification ->get_title ()),
238- 'text ' => strip_tags ($ notification ->get_reference ()),
236+ 'title ' => strip_tags (html_entity_decode ( $ notification ->get_title (), ENT_NOQUOTES , ' UTF-8 ' )),
237+ 'text ' => strip_tags (html_entity_decode ( $ notification ->get_reference (), ENT_NOQUOTES , ' UTF-8 ' )),
239238 'url ' => htmlspecialchars_decode ($ notification ->get_url ()),
240239 'avatar ' => $ notification ->get_avatar (),
241240 ]);
You can’t perform that action at this time.
0 commit comments