mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Add special behavior for <cmd> tags for diagnosis messages...
This commit is contained in:
parent
92d9d49a05
commit
efb45d4ece
1 changed files with 2 additions and 0 deletions
|
@ -479,8 +479,10 @@ class Diagnoser():
|
||||||
s = m18n.n(info[0], **(info[1]))
|
s = m18n.n(info[0], **(info[1]))
|
||||||
# In cli, we remove the html tags
|
# In cli, we remove the html tags
|
||||||
if msettings.get("interface") != "api":
|
if msettings.get("interface") != "api":
|
||||||
|
s = s.replace("<cmd>", "'").replace("</cmd>", "'")
|
||||||
s = html_tags.sub('', s.replace("<br>","\n"))
|
s = html_tags.sub('', s.replace("<br>","\n"))
|
||||||
else:
|
else:
|
||||||
|
s = s.replace("<cmd>", "<code class='cmd'>").replace("</cmd>", "</code>")
|
||||||
# Make it so that links open in new tabs
|
# Make it so that links open in new tabs
|
||||||
s = s.replace("<a href=", "<a target='_blank' rel='noopener noreferrer' href=")
|
s = s.replace("<a href=", "<a target='_blank' rel='noopener noreferrer' href=")
|
||||||
return s
|
return s
|
||||||
|
|
Loading…
Add table
Reference in a new issue