diff --git a/controller/manifest.php b/controller/manifest.php index a4e7d79..dc775d6 100644 --- a/controller/manifest.php +++ b/controller/manifest.php @@ -15,7 +15,6 @@ use phpbb\language\language; use phpbb\path_helper; use phpbb\user; -use phpbb\webpushnotifications\json\sanitizer as json_sanitizer; use Symfony\Component\HttpFoundation\JsonResponse; use Symfony\Component\HttpFoundation\Response; @@ -66,7 +65,7 @@ public function handle(): JsonResponse $manifest = [ 'name' => $this->config['sitename'], - 'short_name' => $this->config['pwa_short_name'] ?: utf8_substr($this->config['sitename'], 0, 12), + 'short_name' => $this->config['pwa_short_name'] ?: utf8_substr(preg_replace('/[^\x20-\x7E]/', '', $this->config['sitename']), 0, 12), 'display' => 'standalone', 'orientation' => 'portrait', 'dir' => $this->language->lang('DIRECTION'), @@ -90,6 +89,6 @@ public function handle(): JsonResponse ]; } - return new JsonResponse(json_sanitizer::sanitize($manifest)); + return new JsonResponse($manifest); } }