Don't render images via u.addHyperlinks
It's currently only used by the MUC header to render URLs in the subject
This commit is contained in:
parent
91c130752c
commit
6b62b51f11
@ -360,8 +360,6 @@ u.addHyperlinks = function (text) {
|
|||||||
return [text];
|
return [text];
|
||||||
}
|
}
|
||||||
|
|
||||||
const show_images = api.settings.get('show_images_inline');
|
|
||||||
|
|
||||||
let list = [text];
|
let list = [text];
|
||||||
if (objs.length) {
|
if (objs.length) {
|
||||||
objs.sort((a, b) => b.start - a.start)
|
objs.sort((a, b) => b.start - a.start)
|
||||||
@ -370,8 +368,6 @@ u.addHyperlinks = function (text) {
|
|||||||
const url_text = text.slice(url_obj.start, url_obj.end);
|
const url_text = text.slice(url_obj.start, url_obj.end);
|
||||||
list = [
|
list = [
|
||||||
text.slice(0, url_obj.start),
|
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),
|
text.slice(url_obj.end),
|
||||||
...list
|
...list
|
||||||
|
Loading…
Reference in New Issue
Block a user