From 124663f943f5e1060819ca1658032da2aebd4afe Mon Sep 17 00:00:00 2001 From: Tsachi Shlidor Date: Tue, 9 Jul 2024 11:07:04 +0300 Subject: [PATCH] fix: chapters innerHTML to innerText (#671) --- src/plugins/chapters/chapters.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/chapters/chapters.js b/src/plugins/chapters/chapters.js index ed07a034..46bd04d9 100644 --- a/src/plugins/chapters/chapters.js +++ b/src/plugins/chapters/chapters.js @@ -146,7 +146,7 @@ const ChaptersPlugin = (function () { this.chaptersTrack.addEventListener('cuechange', () => { const activeCues = Array.from(this.chaptersTrack.activeCues); // Safari needs Array.from() - controlBarChapterHolder.innerHTML = + controlBarChapterHolder.innerText = activeCues.length > 0 ? activeCues[0].text : ''; }); }; @@ -206,7 +206,7 @@ const ChaptersPlugin = (function () { timeTooltip.update = function (seekBarRect, seekBarPoint, content) { const originalUpdateFn = Object.getPrototypeOf(this).update; originalUpdateFn.call(this, seekBarRect, seekBarPoint, content); - chapterEl.innerHTML = getChapterFromPoint(seekBarPoint); + chapterEl.innerText = getChapterFromPoint(seekBarPoint); }; // Handle case of no seek-thumbnails