feat: 消息会话支持免打扰

This commit is contained in:
kuaifan
2023-01-17 17:08:20 +08:00
parent d89377a8fe
commit e84961f20f
20 changed files with 210 additions and 59 deletions

View File

@@ -541,8 +541,7 @@ class WebSocketDialogMsg extends AbstractModel
$text = preg_replace("/<img\s+class=\"browse\"[^>]*?>/", "[图片]", $text);
if (!$preserveHtml) {
$text = strip_tags($text);
$text = str_replace("&nbsp;", " ", $text);
$text = str_replace("&amp;", "&", $text);
$text = str_replace(["&nbsp;", "&amp;", "&lt;", "&gt;"], [" ", "&", "<", ">"], $text);
}
return $text;
}