diff --git a/webapp/alpha/m.js b/webapp/alpha/m.js index e5005dee..eace9826 100644 --- a/webapp/alpha/m.js +++ b/webapp/alpha/m.js @@ -119,18 +119,18 @@ function escapeHtml (string) { function renderAlbum(id, artist, name, albumArtFile, year) { return `
  • -
    +
    ${albumArtFile ? ``: ''} - ${name} ${year ? `
    [${year}]` : ''}
    + ${escapeHtml(name)} ${year ? `
    [${year}]` : ''}
  • `; } function renderArtist(artist) { return `
  • -
    ${artist}
    +
    ${escapeHtml(artist)}
  • `; } @@ -139,8 +139,8 @@ function renderFileWithMetadataHtml(filepath, lokiId, metadata) {
    - ${(!metadata || !metadata.title) ? filepath.split("/").pop() : `${metadata.title}`} - ${metadata.artist ? `
    ${metadata.artist}` : ''} + ${(!metadata || !metadata.title) ? filepath.split("/").pop() : `${escapeHtml(metadata.title)}`} + ${metadata.artist ? `
    ${escapeHtml(metadata.artist)}` : ''}
    @@ -158,8 +158,8 @@ function createMusicFileHtml(fileLocation, title, aa, rating, subtitle) { ${aa ? `` : ''} ${subtitle !== undefined ? `` : ''} - ${rating ? `[${rating}] ` : ''}${title} - ${subtitle !== undefined ? `
    ${subtitle}` : ''} + ${rating ? `[${rating}] ` : ''}${escapeHtml(title)} + ${subtitle !== undefined ? `
    ${escapeHtml(subtitle)}` : ''}
    @@ -905,7 +905,7 @@ async function getAllArtists() { } function getArtistz(el) { - const artist = el.getAttribute('data-artist'); + const artist = decodeURIComponent(el.getAttribute('data-artist')); programState.push({ state: 'artist', name: artist, @@ -983,8 +983,8 @@ async function getAllAlbums() { function getAlbumsOnClick(el) { getAlbumSongs( - el.hasAttribute('data-album') ? el.getAttribute('data-album') : null, - el.hasAttribute('data-artist') ? el.getAttribute('data-artist') : null, + el.hasAttribute('data-album') ? decodeURIComponent(el.getAttribute('data-album')) : null, + el.hasAttribute('data-artist') ? decodeURIComponent(el.getAttribute('data-artist')) : null, el.hasAttribute('data-year') ? el.getAttribute('data-year') : null); }