format links

This commit is contained in:
j 2023-11-17 09:26:16 +01:00
parent 7507257e51
commit 2df0ff50a0

View file

@ -644,13 +644,12 @@ pandora.ui.infoView = function(data, isMixed) {
var ret; var ret;
if (key == 'date' && (!value || value.split('-').length < 4)) { if (key == 'date' && (!value || value.split('-').length < 4)) {
ret = pandora.formatDate(value); ret = pandora.formatDate(value);
} else if (listKeys.indexOf(key) > -1) {
ret = value.split(', ');
} else if (key == 'links') { } else if (key == 'links') {
ret = value.split(', ').map(function(link) { ret = value.split(', ').map(function(link) {
return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>'; return '<a href="' + link + '">' + Ox.parseURL(link).host + '</a>';
}).join(', '); }).join(', ');
} else if (listKeys.indexOf(key) > -1) {
ret = value.split(', ');
} else { } else {
ret = value; ret = value;
} }