--- loncom/publisher/lonpublisher.pm 2004/06/18 16:52:19 1.174 +++ loncom/publisher/lonpublisher.pm 2004/07/07 20:43:20 1.176 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.174 2004/06/18 16:52:19 www Exp $ +# $Id: lonpublisher.pm,v 1.176 2004/07/07 20:43:20 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -584,10 +584,10 @@ sub get_all_text_unbalanced { $result.=$token->[2]; } if ($result =~ /(.*)\Q$tag\E(.*)/s) { + ($result,my $redo)=$result =~ /(.*)\Q$tag\E(.*)/is; #&Apache::lonnet::logthis('Got a winner with leftovers ::'.$2); #&Apache::lonnet::logthis('Result is :'.$1); - $result=$1; - my $redo=$tag.$2; + $redo=$tag.$redo; push (@$pars,HTML::LCParser->new(\$redo)); $$pars[-1]->xml_mode('1'); last; @@ -929,7 +929,7 @@ sub publish { } } } - $outstring=~s/\n*(\<\/[^\>]+\>)\s*$/$allowstr\n$1\n/s; + $outstring=~s/\n*(\<\/[^\>]+\>[^<]*)$/$allowstr\n$1\n/s; # ------------------------------------------------------------- Write modified.