1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix list view item encoding

This commit is contained in:
Bill Thornton 2021-11-10 14:06:53 -05:00
parent 38591e458e
commit a1077b3128

View file

@ -133,21 +133,28 @@ import ServerConnections from '../ServerConnections';
continue; continue;
} }
let elem;
if (i === 0) { if (i === 0) {
if (isLargeStyle) { if (isLargeStyle) {
html += `<${largeTitleTagName} class="listItemBodyText">`; elem = document.createElement(largeTitleTagName);
} else { } else {
html += '<div class="listItemBodyText">'; elem = document.createElement('div');
} }
} else { } else {
html += '<div class="secondary listItemBodyText">'; elem = document.createElement('div');
elem.classList.add('secondary');
} }
html += (textlines[i] || '&nbsp;');
if (i === 0 && isLargeStyle) { elem.classList.add('listItemBodyText');
html += `</${largeTitleTagName}>`;
if (textlines[i]) {
elem.innerText = textlines[i];
} else { } else {
html += '</div>'; elem.innerHTML = '&nbsp;';
} }
html += elem.outerHTML;
} }
return html; return html;