mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 01:06:35 -04:00
Fix unescaped deck names potentially missing from overview (#4084)
* html-escape deck name in overview * move escaping past hook
This commit is contained in:
parent
b4cee124c0
commit
669312d5eb
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
# License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import html
|
||||||
from collections.abc import Callable
|
from collections.abc import Callable
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
@ -197,6 +198,7 @@ class Overview:
|
||||||
table=self._table(),
|
table=self._table(),
|
||||||
)
|
)
|
||||||
gui_hooks.overview_will_render_content(self, content)
|
gui_hooks.overview_will_render_content(self, content)
|
||||||
|
content.deck = html.escape(content.deck)
|
||||||
self.web.stdHtml(
|
self.web.stdHtml(
|
||||||
self._body % content.__dict__,
|
self._body % content.__dict__,
|
||||||
css=["css/overview.css"],
|
css=["css/overview.css"],
|
||||||
|
|
Loading…
Reference in a new issue