Fix javascript error when using video captions
Fixes: CORE-1332 Test plan: * Create an SRT or VTT file in Amara * Upload the file to a new or existing video in Canvas * Refresh browser and attempt to view * it should not throw a javascript error Change-Id: Iadc6ed35e3142428cfd08ce455012ca258b7ab9f Reviewed-on: https://gerrit.instructure.com/148018 Tested-by: Jenkins Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com> Product-Review: Ryan Shaw <ryan@instructure.com> QA-Review: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
parent
e1eeba6edd
commit
bb4b5eacff
|
@ -501,8 +501,8 @@ import htmlEscape from 'str/htmlEscape'
|
|||
track = t.selectedTrack,
|
||||
i,
|
||||
sanitize = function (html) {
|
||||
parser = new DOMParser();
|
||||
doc = parser.parseFromString(html, "text/html");
|
||||
var parser = new DOMParser();
|
||||
var doc = parser.parseFromString(html, "text/html");
|
||||
|
||||
// Remove all nodes except those that are whitelisted
|
||||
var elementWhitelist = [
|
||||
|
|
Loading…
Reference in New Issue