Commit 9e47fff0 authored by JC Brand's avatar JC Brand

Fix failing tests by avoiding empty class attr

parent 99c06876
......@@ -82066,7 +82066,6 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
u.addHyperlinks = function (text) {
return URI.withinString(text, url => {
let classes = '';
const uri = new URI(url);
url = uri.normalize()._string;
const pretty_url = uri._parts.urn ? url : uri.readable();
......@@ -82076,10 +82075,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
}
if (uri._parts.protocol === 'xmpp' && uri._parts.query === 'join') {
classes += 'open-chatroom';
return `<a target="_blank" rel="noopener" class="open-chatroom" href="${url}">${u.escapeHTML(pretty_url)}</a>`;
}
return `<a target="_blank" rel="noopener" class="${classes}" href="${url}">${u.escapeHTML(pretty_url)}</a>`;
return `<a target="_blank" rel="noopener" href="${url}">${u.escapeHTML(pretty_url)}</a>`;
}, {
'start': /\b(?:([a-z][a-z0-9.+-]*:\/\/)|xmpp:|mailto:|www\.)/gi
});
......@@ -262,7 +262,6 @@
u.addHyperlinks = function (text) {
return URI.withinString(text, url => {
let classes = '';
const uri = new URI(url);
url = uri.normalize()._string;
const pretty_url = uri._parts.urn ? url : uri.readable();
......@@ -270,9 +269,9 @@
url = 'http://' + url;
}
if (uri._parts.protocol === 'xmpp' && uri._parts.query === 'join') {
classes += 'open-chatroom';
return `<a target="_blank" rel="noopener" class="open-chatroom" href="${url}">${u.escapeHTML(pretty_url)}</a>`;
}
return `<a target="_blank" rel="noopener" class="${classes}" href="${url}">${u.escapeHTML(pretty_url)}</a>`;
return `<a target="_blank" rel="noopener" href="${url}">${u.escapeHTML(pretty_url)}</a>`;
}, {
'start': /\b(?:([a-z][a-z0-9.+-]*:\/\/)|xmpp:|mailto:|www\.)/gi
});
......
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