cvs commit: www manage_news.pl

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Fri Sep 19 11:06:00 PDT 2003


lizardo     03/09/19 12:06:00

  Modified:    .        manage_news.pl
  Log:
  Fixed entity decoding on archived news.
  
  Revision  Changes    Path
  1.10      +6 -1      www/manage_news.pl
  
  Index: manage_news.pl
  ===================================================================
  RCS file: /home/cvsroot/www/manage_news.pl,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- manage_news.pl	19 Sep 2003 17:33:15 -0000	1.9
  +++ manage_news.pl	19 Sep 2003 18:06:00 -0000	1.10
  @@ -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.9 2003/09/19 17:33:15 jeroen Exp $
  +# $Id: manage_news.pl,v 1.10 2003/09/19 18:06:00 lizardo Exp $
   
   use warnings;
   use strict;
  @@ -203,6 +203,11 @@
       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