From f805f9311071236ea2cad64906067a78599805aa Mon Sep 17 00:00:00 2001 From: j Date: Mon, 29 Feb 2016 17:45:40 +0530 Subject: [PATCH] fix html export --- js/classes.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/js/classes.js b/js/classes.js index a9dd93e..3177fba 100644 --- a/js/classes.js +++ b/js/classes.js @@ -64,7 +64,7 @@ TextArea.prototype.insertTc = function(tcNpt) { TextArea.prototype.getWord = function(pos, val) { if (!val) { val = this.elem.val(); - } + } var c; var i = pos; var j = pos; @@ -114,7 +114,7 @@ TextArea.prototype.fromSrt = function(txt) { out += "\n"; } } else if (parseInt(sp.tcOutMs) < Video.player.duration) { - out += "\n" + Ox.formatDuration(sp.tcOutMs, 3) + "\n\n"; + out += "\n" + Ox.formatDuration(sp.tcOutMs, 3) + "\n\n"; } }); this.elem.val(out); @@ -165,6 +165,7 @@ TextArea.prototype.toSrt = function(fmt) { TextArea.prototype.toHTML = function() { + this.toSrt(); var spans = this.spans; var html = ''; var span, txt; @@ -172,7 +173,7 @@ TextArea.prototype.toHTML = function() { span = spans[i]; txt = ''; txt += '

\n'; - txt += ''; + txt += ''; txt += (i + 1).toString(); txt += "\n"; txt += '
\n'; @@ -180,10 +181,9 @@ TextArea.prototype.toHTML = function() { txt += "

\n\n"; html += txt; } - return Ox.encodeUTF8(html); + return html; } - //creates new Span (tcIn and tcOut in npt format) var Span = function(tcIn, tcOut, text, index) { this.index = index;