We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c3925c commit 9898287Copy full SHA for 9898287
pyglossary/plugins/zimfile/reader.py
@@ -4,6 +4,7 @@
4
5
import os
6
from typing import TYPE_CHECKING
7
+from xml.sax.saxutils import quoteattr
8
9
from pyglossary.core import cacheDir, exc_note, log, pip
10
@@ -103,9 +104,10 @@ def __iter__(self) -> Iterator[EntryType | None]: # noqa: PLR0912
103
104
if zEntry.is_redirect:
105
redirectCount += 1
106
targetWord = zEntry.get_redirect_entry().title
107
+ hrefQuoted = quoteattr("bword://" + targetWord)
108
yield glos.newEntry(
109
term,
- f'Redirect: <a href="bword://{targetWord}">{targetWord}</a>',
110
+ f"Redirect: <a href={hrefQuoted}>{targetWord}</a>",
111
defiFormat="h",
112
)
113
continue
0 commit comments