diff --git a/AUTHORS b/AUTHORS index df40777dd5..e878c89a0b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -51,3 +51,4 @@ Tomas Tichy Toshihiro Suzuki uStudio Inc. <*@ustudio.com> Verizon Digital Media Services <*@verizondigitalmedia.com> +Adrián Gómez Llorente diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 6a33e3d9c0..2fb5a99ad8 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -84,3 +84,4 @@ Toshihiro Suzuki Vasanth Polipelli Vignesh Venkatasubramanian Yohann Connell +Adrián Gómez Llorente diff --git a/lib/text/ttml_text_parser.js b/lib/text/ttml_text_parser.js index 35e2e5e646..e98e9543c1 100644 --- a/lib/text/ttml_text_parser.js +++ b/lib/text/ttml_text_parser.js @@ -461,7 +461,7 @@ shaka.text.TtmlTextParser = class { if (imageElement) { const backgroundImageType = imageElement.getAttribute('imagetype'); const backgroundImageEncoding = imageElement.getAttribute('encoding'); - const backgroundImageData = imageElement.textContent; + const backgroundImageData = imageElement.textContent.trim(); if (backgroundImageType == 'PNG' && backgroundImageEncoding == 'Base64' && backgroundImageData) {