Skip to content

Commit f83ca73

Browse files
committed
🐛 Fix json formatting bug
1 parent 7c221b5 commit f83ca73

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

web/templates/pages/home.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,14 @@ <h3 class="text-xl font-medium tracking-tight mb-2 gradient-text">No apps yet</h
501501
}
502502
</style>
503503

504+
<!-- Safely embed JSON data in a script tag -->
505+
<script type="application/json" id="apps-data">
506+
{{ apps|tojson }}
507+
</script>
508+
504509
<script>
505-
const APPS_DICT = JSON.parse('{{ apps|tojson|safe }}');
510+
// Parse the JSON data from the script tag
511+
const APPS_DICT = JSON.parse(document.getElementById('apps-data').textContent);
506512
const ALL_APPS = Object.keys(APPS_DICT);
507513

508514
// Sort apps to put featured ones first

0 commit comments

Comments
 (0)