Remove links during translation

main
Bob Mottram 2021-07-20 21:04:49 +01:00
parent 2f50edf489
commit 35219af5ea
1 changed files with 4 additions and 0 deletions

View File

@ -220,6 +220,10 @@ def _libretranslate(url: str, text: str,
# LibreTranslate doesn't like markup
text = removeHtml(text)
# remove any links from plain text version of the content
for _, url in links.items():
text = text.replace(url, '')
ltParams = {
"q": text,
"source": source,