Skip to content

Commit d55313e

Browse files
committed
Revert "Duh, we have a sanitizer"
This reverts commit 76963e8. Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent 76963e8 commit d55313e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

controller/manifest.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use phpbb\language\language;
1616
use phpbb\path_helper;
1717
use phpbb\user;
18-
use phpbb\webpushnotifications\json\sanitizer as json_sanitizer;
1918
use Symfony\Component\HttpFoundation\JsonResponse;
2019
use Symfony\Component\HttpFoundation\Response;
2120

@@ -66,7 +65,7 @@ public function handle(): JsonResponse
6665

6766
$manifest = [
6867
'name' => $this->config['sitename'],
69-
'short_name' => $this->config['pwa_short_name'] ?: utf8_substr($this->config['sitename'], 0, 12),
68+
'short_name' => $this->config['pwa_short_name'] ?: utf8_substr(preg_replace('/[^\x20-\x7E]/', '', $this->config['sitename']), 0, 12),
7069
'display' => 'standalone',
7170
'orientation' => 'portrait',
7271
'dir' => $this->language->lang('DIRECTION'),
@@ -90,6 +89,6 @@ public function handle(): JsonResponse
9089
];
9190
}
9291

93-
return new JsonResponse(json_sanitizer::sanitize($manifest));
92+
return new JsonResponse($manifest);
9493
}
9594
}

0 commit comments

Comments
 (0)