forked from hummypkg/webif
Fix quoting and escaping of JS fragments
NB jQuery $('#id') in a string looks like an [expr ...] to Jim!
This commit is contained in:
parent
8bbc28d3c2
commit
243dfdd595
@ -283,9 +283,10 @@ if {$type ne "ts" || ("ODEncrypted" ni $flags && $url eq "") } {
|
||||
</tr>"
|
||||
set hasffmpeg 1
|
||||
} elseif {$type eq "ts" && $url ne ""} {
|
||||
puts { <script type="text/javascript"> }
|
||||
puts "$('#playDL').attr('href','$url').enable();
|
||||
puts { </script> }
|
||||
puts [format {
|
||||
<script type="text/javascript">
|
||||
$('#playDL').attr('href','%s').enable();
|
||||
</script> } $url]
|
||||
}
|
||||
puts "
|
||||
</table>
|
||||
@ -293,10 +294,9 @@ puts "
|
||||
|
||||
if {$hasffmpeg} {
|
||||
set url "/browse/ffmpeg.jim?file=[cgi_quote_url $file]"
|
||||
puts { <script type="text/javascript"> }
|
||||
puts "var url = \"$url\";"
|
||||
puts {
|
||||
$('#ffmpeg').load(url, function() { $('#play, #playDL').enable(); });
|
||||
</script>
|
||||
}
|
||||
puts [format {
|
||||
<script type="text/javascript">
|
||||
var url = "%s";
|
||||
$('#ffmpeg').load(url, function() { $('#play, #playDL').enable(); }); }
|
||||
</script> } $url]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user