From a34ece43744e9289bc186157ea623652fcd05ff5 Mon Sep 17 00:00:00 2001 From: rainbow napkin Date: Wed, 22 Oct 2025 21:20:07 -0400 Subject: [PATCH] Video title now renders escaped entities properly. --- www/js/channel/mediaHandler.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/www/js/channel/mediaHandler.js b/www/js/channel/mediaHandler.js index 4c4f491..f15ef89 100644 --- a/www/js/channel/mediaHandler.js +++ b/www/js/channel/mediaHandler.js @@ -187,7 +187,7 @@ class mediaHandler{ * @param {String} title - Title to set */ setVideoTitle(title){ - this.player.title.textContent = `Currently Playing: ${title}`; + this.player.title.innerText = `Currently Playing: ${utils.unescapeEntities(title)}`; } /** @@ -370,7 +370,7 @@ class nullHandler extends rawFileBase{ } setVideoTitle(title){ - this.player.title.textContent = `Channel Off Air`; + this.player.title.innerText = `Channel Off Air`; } } @@ -601,7 +601,7 @@ class youtubeEmbedHandler extends mediaHandler{ setVideoTitle(){ //Clear out the player title so that youtube's baked in title can do it's thing. //This will be replaced once we complete the full player control and remove the defualt youtube UI - this.player.title.textContent = ""; + this.player.title.innerText = ""; } /** @@ -741,12 +741,12 @@ class hlsLiveStreamHandler extends hlsBase{ setVideoTitle(title){ //Add title as text content for security :P - this.player.title.textContent = `: ${title}`; + this.player.title.innerText = `: ${utils.unescapeEntities(title)}`; //Create glow span const glowSpan = document.createElement('span'); //Fill glow span content - glowSpan.textContent = "🔴LIVE"; + glowSpan.innerText = "🔴LIVE"; //Set glowspan class glowSpan.classList.add('critical-danger-text');