cvs commit: www manage_news.pl

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Fri Oct 24 16:42:09 PDT 2003


lizardo     03/10/24 17:42:09

  Modified:    .        manage_news.pl
  Log:
  manage_news.pl: Fixed entity decoding problem.
  
  Revision  Changes    Path
  1.15      +3 -6      www/manage_news.pl
  
  Index: manage_news.pl
  ===================================================================
  RCS file: /home/cvsroot/www/manage_news.pl,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- manage_news.pl	16 Oct 2003 21:26:28 -0000	1.14
  +++ manage_news.pl	24 Oct 2003 23:42:09 -0000	1.15
  @@ -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.14 2003/10/16 21:26:28 lizardo Exp $
  +# $Id: manage_news.pl,v 1.15 2003/10/24 23:42:09 lizardo Exp $
   
   use warnings;
   use strict;
  @@ -27,6 +27,7 @@
   use POSIX qw(strftime);
   use Getopt::Long;
   use MIME::Parser;
  +use HTML::Entities qw(encode_entities);
   use HTML::Parser;
   use URI;
   use Pod::Usage;
  @@ -219,11 +220,7 @@
   sub handle_Text {
       my ($text) = @_;
   
  -    # Only substitute ampersand if it is not part of an entity
  -    # Regexp extracted from lfs2rss.pl, written by Rob Park
  -    $text =~ s/&(?!\w+;)/&/g;
  -    $text =~ s/</</g;
  -    $text =~ s/>/>/g;
  +    encode_entities($text);
       $buffer .= $text;
   }
   
  
  
  



More information about the website mailing list