fix: resolve message sending failure when containing "\n" using webhook and custom channel (#111)
* 使用webhook和custom通道发送消息时如果内容中包含\n会推送失败的问题 * 消息查看页面增加markdown内容解析,访问链接页面增加GFM拓展解析 * 访问链接页面GFM footnote支持
This commit is contained in:
@@ -5,6 +5,7 @@ import { API, openPage, showError, showSuccess, showWarning } from '../helpers';
|
||||
import { ITEMS_PER_PAGE } from '../constants';
|
||||
import { renderTimestamp } from '../helpers/render';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { marked } from 'marked';
|
||||
|
||||
function renderStatus(status) {
|
||||
switch (status) {
|
||||
@@ -416,7 +417,7 @@ const MessagesTable = () => {
|
||||
) : (
|
||||
''
|
||||
)}
|
||||
{message.content ? <p>{message.content}</p> : ''}
|
||||
{message.content ? <div dangerouslySetInnerHTML={{ __html: marked.parse(message.content) }}></div> : ''}
|
||||
</Modal.Content>
|
||||
<Modal.Actions>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user