mirror of
https://github.com/ankitects/anki.git
synced 2026-01-14 06:23:57 -05: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
8185ad3d3e
commit
101531b45c
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