Open links in new tab in the webadmin

This commit is contained in:
Alexandre Aubin 2020-04-11 18:10:46 +02:00
parent f47352df88
commit b443caf63a

View file

@ -480,6 +480,9 @@ class Diagnoser():
# In cli, we remove the html tags
if msettings.get("interface") != "api":
s = html_tags.sub('', s.replace("<br>","\n"))
else:
# Make it so that links open in new tabs
s = s.replace("<a href=", "<a target='_blank' rel='noopener noreferrer' href=")
return s
item["summary"] = m18n_(item["summary"])