Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #158 from cadecairos/t1235

[#1235] Make TTML use text if textContent is undefined, fixing TTMLParse...
  • Loading branch information...
commit 80d22fe1df27f9838824461e364b746cfa58ad4b 2 parents 7f03406 + 6897ed2
@cadecairos cadecairos authored
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 );
Please sign in to comment.
Something went wrong with that request. Please try again.