--- loncom/publisher/lonpublisher.pm 2003/04/02 02:17:10 1.121 +++ loncom/publisher/lonpublisher.pm 2003/06/24 23:24:48 1.122 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.121 2003/04/02 02:17:10 www Exp $ +# $Id: lonpublisher.pm,v 1.122 2003/06/24 23:24:48 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -190,7 +190,7 @@ sub metaeval { } if ($metadatafields{$unikey}) { my $newentry=$parser->get_text('/'.$entry); - unless (($metadatafields{$unikey}=~/$newentry/) || + unless (($metadatafields{$unikey}=~/\Q$newentry\E/) || ($newentry eq '')) { $metadatafields{$unikey}.=', '.$newentry; } @@ -911,7 +911,7 @@ sub publish { # ------------------------------------------------ Check out directory hierachy my $thisdisfn=$source; - $thisdisfn=~s/^\/home\/$cuname\///; + $thisdisfn=~s/^\/home\/\Q$cuname\E\///; my @urlparts=split(/\//,$thisdisfn); $#urlparts--; @@ -1054,7 +1054,7 @@ END foreach (sort keys %keywords) { $keywordout.='dir_config('lonDocRoot'); my $thisdistarget=$targetfile; - $thisdistarget=~s/^$docroot//; + $thisdistarget=~s/^\Q$docroot\E//; undef %metadatafields; @@ -1702,10 +1702,10 @@ unless ($ENV{'form.phase'} eq 'two') { $thistarget=~s/\/public\_html//; my $thisdistarget=$thistarget; - $thisdistarget=~s/^$docroot//; + $thisdistarget=~s/^\Q$docroot\E//; my $thisdisfn=$thisfn; - $thisdisfn=~s/^\/home\/$cuname\/public_html\///; + $thisdisfn=~s/^\/home\/\Q$cuname\E\/public_html\///; if ($fn=~/\/$/) { # -------------------------------------------------------- This is a directory