mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-18 08:08:45 +01:00
Merge commit from fork
* Rework frontend code interacting directly with DOM Rework frontend code that uses user-supplied data to render things like comments and notes. In places where using React's built-in sanitization is possible, the feature is used. In other places, where some markup might be necessary, DOMPurify is used to sanitize the HTML before rendering it. Solves: GHSA-rh3r-8pxm-hg4w * Remove test post DOM rework * fixup! Rework frontend code interacting directly with DOM
This commit is contained in:
parent
c3a4585c83
commit
d7ec7355c9
11 changed files with 99 additions and 69 deletions
|
|
@ -30,17 +30,7 @@ export const MultiLineTextField = memo(
|
|||
>
|
||||
{lines.length === 0 && emptyText
|
||||
? emptyText
|
||||
: lines.map((line, idx) =>
|
||||
line === '' ? (
|
||||
<br key={md5(line + idx)} />
|
||||
) : (
|
||||
<div
|
||||
data-testid={`${source}.${idx}`}
|
||||
key={md5(line + idx)}
|
||||
dangerouslySetInnerHTML={{ __html: line }}
|
||||
/>
|
||||
),
|
||||
)}
|
||||
: lines}
|
||||
</Typography>
|
||||
)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue