mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-26 07:22:27 +00:00
perf: 优化命令禁止发送消息时,slack消息会包含html标签内容
This commit is contained in:
@@ -38,6 +38,9 @@ class SlackRenderer(mistune.Renderer):
|
||||
lines[i] = prefix + line[4:-5]
|
||||
return '\n'.join(lines)
|
||||
|
||||
def block_code(self, code, lang=None):
|
||||
return f'`{code}`'
|
||||
|
||||
def link(self, link, title, content):
|
||||
if title or content:
|
||||
label = str(title or content).strip()
|
||||
|
Reference in New Issue
Block a user