--- loncom/publisher/lonpublisher.pm 2001/09/26 16:26:49 1.45 +++ loncom/publisher/lonpublisher.pm 2001/12/04 15:32:57 1.53 @@ -11,7 +11,7 @@ # 04/16/2001 Scott Harrison # 05/03,05/05,05/07 Gerd Kortemeyer # 05/28/2001 Scott Harrison -# 06/23,08/07,08/11,8/13,8/17,8/18,8/24,9/26 Gerd Kortemeyer +# 06/23,08/07,08/11,8/13,8/17,8/18,8/24,9/26,10/16 Gerd Kortemeyer package Apache::lonpublisher; @@ -225,14 +225,18 @@ sub publish { } my $outstring=''; my $parser=HTML::TokeParser->new(\$content); + $parser->xml_mode(1); my $token; while ($token=$parser->get_token) { if ($token->[0] eq 'S') { my $counter; my $tag=$token->[1]; - unless ($tag eq 'allow') { + my $lctag=$tag;$lctag=~/[A-Z]/[a-z]/g; + unless ($lctag eq 'allow') { my %parms=%{$token->[2]}; - if ($counter=$addid{$tag}) { + $counter=$addid{$tag}; + if (!$counter) { $counter=$addid{$lctag}; } + if ($counter) { if ($counter eq 'id') { unless (defined($parms{'id'})) { $maxid++; @@ -261,7 +265,7 @@ sub publish { } } ('src','href','background'); - if ($tag eq 'applet') { + if ($lctag eq 'applet') { my $codebase=''; if (defined($parms{'codebase'})) { my $oldcodebase=$parms{'codebase'}; @@ -470,7 +474,7 @@ sub publish { my $keywordout='

Keywords:
'; my $colcount=0; - { + if (length($content)<500000) { my $textonly=$content; $textonly=~s/\//g; $textonly=~s/\[^\<]+\<\/m\>//g; @@ -502,11 +506,14 @@ sub publish { } $colcount++; } sort keys %keywords; - $keywordout.='
'; + } else { + $keywordout.='File too long for keyword analysis'; } - $scrout.=$keywordout; + $keywordout.=''; + + $scrout.=$keywordout; $scrout.=&textfield('Additional Keywords','addkey','');