--- rat/lonwrapper.pm 2023/10/06 17:35:54 1.49.2.11.2.5 +++ rat/lonwrapper.pm 2023/11/18 21:50:06 1.85 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Wrapper for external and binary files as standalone resources # -# $Id: lonwrapper.pm,v 1.49.2.11.2.5 2023/10/06 17:35:54 raeburn Exp $ +# $Id: lonwrapper.pm,v 1.85 2023/11/18 21:50:06 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -82,7 +82,7 @@ sub wrapper { } } - my $noiframe = &Apache::loncommon::modal_link($url.$anchor,$lt{'show'},500,400); + my $noiframe = &Apache::loncommon::modal_link(&HTML::Entities::encode($url.$anchor,'&<>"\''),$lt{'show'},500,400); my $args = {'bgcolor' => '#FFFFFF'}; if ($forcereg) { $args->{'force_register'} = $forcereg; @@ -153,13 +153,7 @@ sub wrapper { # unless ($clientmobile || ($exttool eq 'window') || ($exttool eq 'tab') || $uselink) { - $headjs = ' -'."\n"; + $headjs = &Apache::loncommon::iframe_wrapper_headjs(); } my $startpage = &Apache::loncommon::start_page('Menu',$headjs,$args).$countdown.$donemsg; @@ -302,49 +296,8 @@ ENDLINK $linktext = &mt('Link to resource'); return $startpage.&create_link($url,$anchor,$title,$linktext).$endpage; } else { - my $offset = 5; - &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['inhibitmenu']); - if (($env{'form.inhibitmenu'} eq 'yes') || ($env{'form.only_body'})) { - $offset = 0; - } - my $script = &Apache::lonhtmlcommon::scripttag(<"'); return <