Fix unescaped deck names potentially missing from overview (#4084)

* html-escape deck name in overview

* move escaping past hook
This commit is contained in:
llama 2025-06-18 12:35:02 +08:00 committed by GitHub
parent b4cee124c0
commit 669312d5eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,6 +2,7 @@
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
from __future__ import annotations
import html
from collections.abc import Callable
from dataclasses import dataclass
from typing import Any
@ -197,6 +198,7 @@ class Overview:
table=self._table(),
)
gui_hooks.overview_will_render_content(self, content)
content.deck = html.escape(content.deck)
self.web.stdHtml(
self._body % content.__dict__,
css=["css/overview.css"],