This commit is contained in:
恍兮惚兮 2024-05-19 00:56:26 +08:00
parent a2edfa15b3
commit aadc0befd9
4 changed files with 3 additions and 4 deletions

View File

@ -19,7 +19,7 @@ class goo(cishubase):
xx = re.sub("</a>", "", xx)
if len(xx):
return (
'<div style="text-align: center;"><a target="_blank" href="{}">link</a></div>'.format(
'<div style="text-align: center;"><a href="{}">link</a></div>'.format(
url
)
+ xx

View File

@ -27,7 +27,7 @@ class weblio(cishubase):
join = "<br>".join(_all)
if len(join):
return (
'<div style="text-align: center;"><a target="_blank" href="{}">link</a></div>'.format(
'<div style="text-align: center;"><a href="{}">link</a></div>'.format(
url
)
+ join

View File

@ -28,7 +28,7 @@ class youdao(cishubase):
if len(fnd[0][1]):
return (
'<div style="text-align: center;"><a target="_blank" href="{}">link</a></div><br>'.format(
'<div style="text-align: center;"><a href="{}">link</a></div><br>'.format(
"https://dict.youdao.com/result?word={}&lang={}".format(
quote(word), self.srclang
)

View File

@ -613,7 +613,6 @@ class mshtmlWidget(QWidget):
self.browser.resize(0, 0, size[0], size[1])
def setHtml(self, html):
html = html.replace('target="_blank"', "")
html = """<html><head><meta http-equiv='x-ua-compatible' content='IE=edge'></head><body style=" font-family:'{}'">{}</body></html>""".format(
QFontDatabase.systemFont(QFontDatabase.GeneralFont).family(), html
)