Skip to content

Commit 67cb0ab

Browse files
committed
html decode configs with possible emojis for PWA
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent 7a461dd commit 67cb0ab

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

controller/manifest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,13 @@ public function handle(): JsonResponse
6363
$board_path = $this->config['force_server_vars'] ? $this->config['script_path'] : $this->path_helper->get_web_root_path();
6464
$board_url = generate_board_url();
6565

66+
// Emoji fixer-uppers
67+
$sitename = html_entity_decode($this->config['sitename'], ENT_QUOTES, 'UTF-8');
68+
$pwa_short_name = html_entity_decode($this->config['pwa_short_name'], ENT_QUOTES, 'UTF-8');
69+
6670
$manifest = [
67-
'name' => $this->config['sitename'],
68-
'short_name' => $this->config['pwa_short_name'] ?: utf8_substr(html_entity_decode($this->config['sitename'], ENT_QUOTES, 'UTF-8'), 0, 12),
71+
'name' => $sitename,
72+
'short_name' => $pwa_short_name ?: utf8_substr($sitename, 0, 12),
6973
'display' => 'standalone',
7074
'orientation' => 'portrait',
7175
'dir' => $this->language->lang('DIRECTION'),

0 commit comments

Comments
 (0)