diff --git a/public/script.js b/public/script.js
index 543e3e3c0..02d7dfa3a 100644
--- a/public/script.js
+++ b/public/script.js
@@ -787,6 +787,10 @@ function messageFormating(mes, ch_name, isSystem, forceAvatar) {
mes = mes.replace(/{.*}/g, "");
mes = mes.replace(/\n/g, "
");
mes = mes.trim();
+
+ mes = mes.replace(/[\s\S]*?<\/code>/g, function(match) {
+ return match.replace(/&/g, '&');
+ });
}
if (forceAvatar) {