fix links in album description

This commit is contained in:
jeffvli
2025-12-22 20:43:26 -08:00
parent ac3dcb5e17
commit a67ae50d16
3 changed files with 7 additions and 9 deletions
@@ -372,9 +372,7 @@ export const AlbumDetailContent = () => {
<div className={styles.detailContainer}> <div className={styles.detailContainer}>
{comment && ( {comment && (
<Spoiler maxHeight={75}> <Spoiler maxHeight={75}>
<Text <Text pb="md">{replaceURLWithHTMLLinks(comment)}</Text>
dangerouslySetInnerHTML={{ __html: replaceURLWithHTMLLinks(comment) }}
/>
</Spoiler> </Spoiler>
)} )}
<div className={styles.contentLayout}> <div className={styles.contentLayout}>
@@ -212,11 +212,7 @@ const DummyAlbumDetailRoute = () => {
{comment && ( {comment && (
<section> <section>
<Spoiler maxHeight={75}> <Spoiler maxHeight={75}>
<Text <Text pb="md">{replaceURLWithHTMLLinks(comment)}</Text>
dangerouslySetInnerHTML={{
__html: replaceURLWithHTMLLinks(comment),
}}
/>
</Spoiler> </Spoiler>
</section> </section>
)} )}
@@ -98,7 +98,11 @@ const formatArtists = (artists: null | RelatedArtist[] | undefined) =>
)); ));
const formatComment = (item: Album | Song) => const formatComment = (item: Album | Song) =>
item.comment ? <Spoiler maxHeight={50}>{replaceURLWithHTMLLinks(item.comment)}</Spoiler> : null; item.comment ? (
<Spoiler maxHeight={50}>
<Text>{replaceURLWithHTMLLinks(item.comment)}</Text>
</Spoiler>
) : null;
const FormatGenre = (item: Album | AlbumArtist | Playlist | Song) => { const FormatGenre = (item: Album | AlbumArtist | Playlist | Song) => {
if (!item.genres?.length) { if (!item.genres?.length) {