Skip to content
Browse files

Merge pull request #158 from cadecairos/t1235

[#1235] Make TTML use text if textContent is undefined, fixing TTMLParse...
  • Loading branch information...
2 parents 7f03406 + 6897ed2 commit 80d22fe1df27f9838824461e364b746cfa58ad4b @cadecairos cadecairos committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 parsers/parserTTML/popcorn.parserTTML.js
View
2 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, "<br />" );
+ sub.text = ( node.textContent || node.text ).replace( rWhitespace, "" ).replace( rLineBreak, "<br />" );
sub.id = node.getAttribute( "xml:id" ) || node.getAttribute( "id" );
sub.start = toSeconds ( node.getAttribute( "begin" ), timeOffset );
sub.end = toSeconds( node.getAttribute( "end" ), timeOffset );

0 comments on commit 80d22fe

Please sign in to comment.
Something went wrong with that request. Please try again.