We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 33dffd2 commit d67a312Copy full SHA for d67a312
1 file changed
src/io/import/cleaner.ts
@@ -7,11 +7,13 @@ export function cleanContent(rawContent: string): string {
7
// 删除CQ 码
8
.replace(/\[CQ:[^\]]+\]/g, '')
9
10
- // 删除 HTML 标签
+ // 删除常见 HTML tag
11
.replace('<!--', '')
12
.replace('-->', '')
13
- // .replace(/<[^>]+>/g, '')
14
- // 在找到更好的办法之前,暂时先不过滤了,以免误伤骰娘的回复
+ .replace(
+ /<\/?(img|span|div|p|a|b|i|u|strong|style|script)\b[^>]*>/gi,
15
+ '',
16
+ )
17
18
// 删除行首的 #
19
.replace(/^#/gm, '')
0 commit comments