mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 15:32:23 -04:00
Escape HTML in deck names in the deck list
Due to the way the deck list is constructed in Python, this could lead to the execution of script tags. Thanks to Tyler Butler for the report.
This commit is contained in:
parent
21cd4f2f17
commit
5a1c29a818
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import html
|
||||
from copy import deepcopy
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
@ -230,7 +231,7 @@ class DeckBrowser:
|
|||
collapse,
|
||||
extraclass,
|
||||
node.deck_id,
|
||||
node.name,
|
||||
html.escape(node.name),
|
||||
)
|
||||
# due counts
|
||||
def nonzeroColour(cnt: int, klass: str) -> str:
|
||||
|
|
Loading…
Reference in a new issue