--- loncom/xml/scripttag.pm 2014/08/03 14:20:43 1.171 +++ loncom/xml/scripttag.pm 2024/02/28 15:52:39 1.172.2.2.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # '; + } + } elsif ($target eq 'meta') { my $bodytext=&Apache::lonxml::get_all_text_unbalanced("/script",$parser); } @@ -141,7 +176,7 @@ sub start_script { } } } elsif (($type eq 'text/javascript') && ($bodytext ne '')) { - if ($url =~ m{^\Q/uploaded/$cdom/$cnum/docs/\E}) { + if ($url =~ m{^\Q/uploaded/$cdom/$cnum/\E(docs|supplemental)/}) { if ($bodytext =~ m{\.addMediaSrc\((["'])((?!\1).)+\1\);}) { my $quote = $1; if ($bodytext =~ m{\Q.addMediaSrc($quote\E([^$quote]+)\Q$quote)\E}) { @@ -645,12 +680,14 @@ sub end_storetc { sub start_physnet { my ($target,$token,$tagstack,$parstack,$parser,$safeeval,$style)=@_; - my $bodytext = '/adm/includes/physnet.sty'; + my $bodytext = '/res/adm/includes/physnet.sty'; my $location=&Apache::lonnet::filelocation($Apache::lonxml::pwd['-1'],$bodytext); my $cbistyletext=&Apache::lonnet::getfile($location); %$style = (%$style,&Apache::style::styleparser($target,$cbistyletext)); - $$parser['-1']->unget_token($token); + if (keys(%$style) && (($target eq 'web') || ($target eq 'tex'))) { + $$parser['-1']->unget_token($token); + } # if ( defined($$style{'physnet'}) ) { # &Apache::lonxml::newparser($parser,\$$style{'physnet'}); # }