diff --git a/scripts/communityScripts/chat/FloofChat.html b/scripts/communityScripts/chat/FloofChat.html
index b493b05090..7c6d54f608 100644
--- a/scripts/communityScripts/chat/FloofChat.html
+++ b/scripts/communityScripts/chat/FloofChat.html
@@ -160,7 +160,7 @@
return elContent;
}
-
+
// For any URLs present, unless they are already identified within
// an `a` element, linkify them.
function _linkifyUrls(matches, $el) {
@@ -181,23 +181,28 @@
case ext == "JPG":
case ext == "GIF":
case ext == "JPEG":
- elContent = elContent.replace(this, "

" + this
- + "📲");
+ var replaceWith = "
";
+ replaceWith += "
";
+ replaceWith += "" + this + "";
+ replaceWith += "📲";
+
+ elContent = elContent.replace(this, replaceWith);
break;
case ext == "iframe":
- elContent = elContent.replace(this, "
");
+ var replaceWith = "
";
+ replaceWith += "";
+
+ elContent = elContent.replace(this, replaceWith);
break;
case ext == "webm":
- elContent = elContent.replace(this, "
" + this
- + "📲");
+ var replaceWith = "
";
+ replaceWith += "
";
+ replaceWith += "" + this + "";
+ replaceWith += "📲";
+
+ elContent = elContent.replace(this, replaceWith);
break;
case protocol === "HIFI":
case protocol === "hifi":
@@ -206,22 +211,25 @@
case !!this.match(/(https?:\/\/)?(www\.)?(youtube\.com\/watch\?v=|youtu\.be\/)([^& \n<]+)(?:[^ \n<]+)?/g):
var youtubeMatch = this.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);
if (youtubeMatch && youtubeMatch[2].length == 11) {
- elContent = "
" + this
- + "📲";
+ var replaceWith = "
";
+ replaceWith += "