Commit 6b62b51f authored by JC Brand's avatar JC Brand

Don't render images via u.addHyperlinks

It's currently only used by the MUC header to render URLs in the subject
parent 91c13075
......@@ -360,8 +360,6 @@ u.addHyperlinks = function (text) {
return [text];
}
const show_images = api.settings.get('show_images_inline');
let list = [text];
if (objs.length) {
objs.sort((a, b) => b.start - a.start)
......@@ -370,9 +368,7 @@ u.addHyperlinks = function (text) {
const url_text = text.slice(url_obj.start, url_obj.end);
list = [
text.slice(0, url_obj.start),
show_images && u.isImageURL(url_text) ?
u.convertToImageTag(url_text) :
u.convertUrlToHyperlink(url_text),
u.convertUrlToHyperlink(url_text),
text.slice(url_obj.end),
...list
];
......
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