diff --git a/client/js/chat.js b/client/js/chat.js
index 228771f3..bf7ef4af 100644
--- a/client/js/chat.js
+++ b/client/js/chat.js
@@ -410,9 +410,10 @@ $(function() {
});
text = escape(text);
for (var i in urls) {
+ var url = escape(urls[i]);
text = text.replace(
"{" + i + "}",
- "" + urls[i] + ""
+ "" + url + ""
);
}
return text;