cvs commit: www manage_news.pl

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Fri Sep 19 12:22:55 PDT 2003


lizardo     03/09/19 13:22:55

  Modified:    .        manage_news.pl
  Log:
  manage_news.pl: Better fix for the entity decoding bug.
  
  Revision  Changes    Path
  1.11      +2 -6      www/manage_news.pl
  
  Index: manage_news.pl
  ===================================================================
  RCS file: /home/cvsroot/www/manage_news.pl,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- manage_news.pl	19 Sep 2003 18:06:00 -0000	1.10
  +++ manage_news.pl	19 Sep 2003 19:22:55 -0000	1.11
  @@ -17,7 +17,7 @@
   # along with this program; if not, write to the Free Software
   # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
   
  -# $Id: manage_news.pl,v 1.10 2003/09/19 18:06:00 lizardo Exp $
  +# $Id: manage_news.pl,v 1.11 2003/09/19 19:22:55 lizardo Exp $
   
   use warnings;
   use strict;
  @@ -154,6 +154,7 @@
               end_h => [\&handle_EndTag, "tagname"],
               text_h => [\&handle_Text, "dtext" ],
           );
  +        $html_p->attr_encoded(1);
           my ($year, $month, undef) = split /\//, Get_header($part->head, "date");
           my $archive_file = $archive_under."/".$year."/".$month.".html";
           open(NEWS, ">>$archive_file") or die "Could not open $archive_file" . ": $!\n";
  @@ -203,11 +204,6 @@
       my ($tag, $attrs) = @_;
   
       if ($tag eq "a" and $$attrs{"href"}) {
  -        # Encode some special chars on URLs
  -        $$attrs{"href"} =~ s/\&/\&/g;
  -        $$attrs{"href"} =~ s/</\</g;
  -        $$attrs{"href"} =~ s/>/\>/g;
  -
           $$attrs{"href"} = URI->new($$attrs{"href"})->abs($base_url)->as_string;
       }
       elsif ($tag eq "img" and $$attrs{"src"}) {
  
  
  



More information about the website mailing list