--- loncom/publisher/lonpublisher.pm 2004/01/27 22:54:59 1.163 +++ loncom/publisher/lonpublisher.pm 2004/04/14 18:29:32 1.166 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.163 2004/01/27 22:54:59 albertel Exp $ +# $Id: lonpublisher.pm,v 1.166 2004/04/14 18:29:32 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -126,7 +126,7 @@ use Apache::loncommon(); use Apache::lonmysql; use Apache::lonlocal; use Apache::loncfile; -use Apache::lonmeta; +use LONCAPA::lonmetadata; use Apache::lonmsg; use vars qw(%metadatafields %metadatakeys); @@ -809,7 +809,7 @@ sub store_metadata { $metadata{'url'}."'"); if ($#oldmeta==0) { # yes, there is one old entry, transfer to newmetadata - %newmetadata=&Apache::lonmeta::metadata_col_to_hash(@{$oldmeta[0]}); + %newmetadata=&LONCAPA::lonmetadata::metadata_col_to_hash(@{$oldmeta[0]}); # remove old entry $status=&Apache::lonmysql::remove_from_table ('metadata','url',$metadata{'url'}); @@ -920,11 +920,11 @@ sub publish { $allowstr.="\n".''; } $scrout.='
'; - unless ($thisdep=~/\*/) { + if ($thisdep!~/\*/ && $thisdep!~m|^/adm/|) { $scrout.=''; } $scrout.=''.$thisdep.''; - unless ($thisdep=~/\*/) { + if ($thisdep!~/\*/ && $thisdep!~m|^/adm/|) { $scrout.=''; if ( &Apache::lonnet::getfile($Apache::lonnet::perlvar{'lonDocRoot'}.'/'. @@ -945,11 +945,6 @@ sub publish { } $outstring=~s/\n*(\<\/[^\>]+\>)\s*$/$allowstr\n$1\n/s; -### FIXME: is this really what we want? -# I dont' think so, to will corrupt any UTF-8 resources at least, -# and any encoding other than ISO-8859-1 will probably break - #Encode any High ASCII characters - #$outstring=&HTML::Entities::encode($outstring,"\200-\377"); # ------------------------------------------------------------- Write modified. { @@ -1419,7 +1414,7 @@ sub phasetwo { print $mfh ' '.$_.'="'.$value.'"'; } print $mfh '>'. - &HTML::Entities::encode($metadatafields{$unikey}) + &HTML::Entities::encode($metadatafields{$unikey},'<>&"') .''; } }