fix(app): replace innerHTML='' with textContent='' in usePlayer
Safer DOM clearing that avoids innerHTML for content sanitization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
2581f20ebf
commit
e7496883c4
@@ -106,7 +106,7 @@ export function usePlayer() {
|
||||
audioEl.src = result.url
|
||||
audioEl.crossOrigin = 'anonymous'
|
||||
audioEl.preload = 'auto'
|
||||
containerEl.innerHTML = ''
|
||||
containerEl.textContent = ''
|
||||
containerEl.appendChild(audioEl)
|
||||
plyrInstance = new Plyr(audioEl, {
|
||||
controls: [],
|
||||
@@ -144,7 +144,7 @@ export function usePlayer() {
|
||||
iframe.style.width = '100%'
|
||||
iframe.style.height = '100%'
|
||||
iframe.style.border = 'none'
|
||||
containerEl.innerHTML = ''
|
||||
containerEl.textContent = ''
|
||||
containerEl.appendChild(iframe)
|
||||
plyrInstance = null
|
||||
audioEl = null
|
||||
@@ -160,7 +160,7 @@ export function usePlayer() {
|
||||
}
|
||||
audioEl = null
|
||||
if (containerEl) {
|
||||
containerEl.innerHTML = ''
|
||||
containerEl.textContent = ''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user