From 6897ed245b21360b3a5ac28f845dbd2c74fab436 Mon Sep 17 00:00:00 2001 From: Christopher De Cairos Date: Tue, 24 Jul 2012 14:14:17 -0400 Subject: [PATCH] [#1235] Make TTML use text if textContent is undefined, fixing TTMLParser work in IE9 --- parsers/parserTTML/popcorn.parserTTML.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parsers/parserTTML/popcorn.parserTTML.js b/parsers/parserTTML/popcorn.parserTTML.js index 173af4fad..55ab77ab5 100644 --- a/parsers/parserTTML/popcorn.parserTTML.js +++ b/parsers/parserTTML/popcorn.parserTTML.js @@ -105,7 +105,7 @@ var sub = {}; // Trim left and right whitespace from text and convert non-explicit line breaks - sub.text = node.textContent.replace( rWhitespace, "" ).replace( rLineBreak, "
" ); + sub.text = ( node.textContent || node.text ).replace( rWhitespace, "" ).replace( rLineBreak, "
" ); sub.id = node.getAttribute( "xml:id" ) || node.getAttribute( "id" ); sub.start = toSeconds ( node.getAttribute( "begin" ), timeOffset ); sub.end = toSeconds( node.getAttribute( "end" ), timeOffset );