newlines in srt are explicit, fixes #634

This commit is contained in:
j 2012-03-03 10:53:12 +01:00
commit 159b6dc746
3 changed files with 7 additions and 3 deletions

View file

@ -60,7 +60,10 @@ pandora.ui.importAnnotations = function(data) {
function addAnnotation() {
if(srt.length>0) {
var data = srt.shift();
data.text = Ox.parseHTML(data.text);
data.text = Ox.parseHTML(data.text)
.replace(/<br[ /]*?>\n/g, '\n')
.replace(/\n\n/g, '<br>\n')
.replace(/\n/g, '<br>\n');
$status.html(Ox.formatDuration(data['in'])
+ ' to ' + Ox.formatDuration(data.out) + '<br>\n'
+ data.text);