--- loncom/publisher/lonpublisher.pm 2014/08/03 13:52:59 1.292 +++ loncom/publisher/lonpublisher.pm 2014/08/03 14:20:38 1.293 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.292 2014/08/03 13:52:59 raeburn Exp $ +# $Id: lonpublisher.pm,v 1.293 2014/08/03 14:20:38 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -825,6 +825,14 @@ sub fix_ids_and_indices { # my $spritesheet = $1.'express_show/spritesheet.png'; $allow{&absoluteurl($spritesheet,$target)}=1; + +# +# Camtasia 8.4: skins/express_show/spritesheet.min.css needed, and included in zip archive. +# Not referenced directly in
.html or
_player.html files, +# so add this file to %allow (where
is name user gave to file/archive). +# + my $spritecss = $1.'express_show/spritesheet.min.css'; + $allow{&absoluteurl($spritecss,$target)}=1; } } elsif ($srctype eq 'PosterImageSrc') { if ($url =~ m{^(.+)_First_Frame\.png$}) { @@ -843,6 +851,15 @@ sub fix_ids_and_indices { } } } + if ($script =~ m{\.addMediaSrc\((["'])((?!\1).+)\1\);}) { + my $src = $2; + if ($src) { + my $url = &urlfixup($src); + unless ($url=~m{^(?:http|https|ftp)://}) { + $allow{&absoluteurl($url,$target)}=1; + } + } + } if ($script =~ /\(document,\s*(['"])script\1,\s*\[([^\]]+)\]\);/s) { my $scriptslist = $2; my @srcs = split(/\s*,\s*/,$scriptslist); @@ -857,6 +874,15 @@ sub fix_ids_and_indices { } } } + if ($script =~ m{loadScript\(\s*(['"])((?:(?!\1).)+\.js)\1,\s*function}is) { + my $src = $2; + if ($src) { + my $url = &urlfixup($src); + unless ($url=~m{^(?:http|https|ftp)://}) { + $allow{&absoluteurl($url,$target)}=1; + } + } + } $outstring .= $script; } }