Commit 182dc55f authored by JC Brand's avatar JC Brand

Bugfix. event wasn't defined

parent 0b22b5a6
...@@ -79,12 +79,12 @@ ...@@ -79,12 +79,12 @@
} }
$obj.html(x); $obj.html(x);
_.each(list, function (url) { _.each(list, function (url) {
isImage(url).then(function () { isImage(url).then(function (ev) {
var prot = url.indexOf('http://') === 0 || url.indexOf('https://') === 0 ? '' : 'http://'; var prot = url.indexOf('http://') === 0 || url.indexOf('https://') === 0 ? '' : 'http://';
var escaped_url = encodeURI(decodeURI(url)).replace(/[!'()]/g, escape).replace(/\*/g, "%2A"); var escaped_url = encodeURI(decodeURI(url)).replace(/[!'()]/g, escape).replace(/\*/g, "%2A");
var new_url = '<a target="_blank" rel="noopener" href="' + prot + escaped_url + '">'+ url + '</a>'; var new_url = '<a target="_blank" rel="noopener" href="' + prot + escaped_url + '">'+ url + '</a>';
event.target.className = 'chat-image'; ev.target.className = 'chat-image';
x = x.replace(new_url, event.target.outerHTML); x = x.replace(new_url, ev.target.outerHTML);
$obj.throttledHTML(x); $obj.throttledHTML(x);
}); });
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment