diff --git a/app/Models/WebSocketDialogMsg.php b/app/Models/WebSocketDialogMsg.php
index 64eb94c6e..db4d2a8ea 100644
--- a/app/Models/WebSocketDialogMsg.php
+++ b/app/Models/WebSocketDialogMsg.php
@@ -542,6 +542,7 @@ class WebSocketDialogMsg extends AbstractModel
if (!$preserveHtml) {
$text = strip_tags($text);
$text = str_replace(" ", " ", $text);
+ $text = str_replace("&", "&", $text);
}
return $text;
}
diff --git a/resources/assets/js/functions/web.js b/resources/assets/js/functions/web.js
index e7f594423..51ba84fd0 100755
--- a/resources/assets/js/functions/web.js
+++ b/resources/assets/js/functions/web.js
@@ -376,6 +376,7 @@
text = text.replace(/
]*?>/g, `[${$A.L('动画表情')}]`)
text = text.replace(/
]*?>/g, `[${$A.L('图片')}]`)
text = text.replace(/ /g," ")
+ text = text.replace(/&/g,"&")
return text.replace(/<[^>]+>/g,"")
},