mirror of https://gitlab.com/bashrc2/epicyon
Remove html prior to automatic translation
parent
f6385c0e08
commit
8f29e1a557
|
@ -4239,9 +4239,9 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
fields.get('passwordconfirm'):
|
fields.get('passwordconfirm'):
|
||||||
if len(fields['password']) > 2 and \
|
if len(fields['password']) > 2 and \
|
||||||
fields['password'] == fields['passwordconfirm']:
|
fields['password'] == fields['passwordconfirm']:
|
||||||
# set password
|
# set password
|
||||||
storeBasicCredentials(baseDir, nickname,
|
storeBasicCredentials(baseDir, nickname,
|
||||||
fields['password'])
|
fields['password'])
|
||||||
|
|
||||||
# change city
|
# change city
|
||||||
if fields.get('cityDropdown'):
|
if fields.get('cityDropdown'):
|
||||||
|
|
|
@ -10,6 +10,7 @@ __module_group__ = "Core"
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
from urllib import request, parse
|
from urllib import request, parse
|
||||||
|
from utils import removeHtml
|
||||||
from utils import acctDir
|
from utils import acctDir
|
||||||
from utils import hasObjectDict
|
from utils import hasObjectDict
|
||||||
from utils import getConfigParam
|
from utils import getConfigParam
|
||||||
|
@ -195,6 +196,9 @@ def _libretranslate(url: str, text: str,
|
||||||
else:
|
else:
|
||||||
url += "translate"
|
url += "translate"
|
||||||
|
|
||||||
|
# LibreTranslate doesn't like markup
|
||||||
|
text = removeHtml(text)
|
||||||
|
|
||||||
ltParams = {
|
ltParams = {
|
||||||
"q": text,
|
"q": text,
|
||||||
"source": source,
|
"source": source,
|
||||||
|
|
Loading…
Reference in New Issue