cvsuser     06/02/28 14:02:31

  Modified:    App-Widget/lib/App Widget.pm
  Log:
  fixed unbalance sub_entry()/sub_exit()
  
  Revision  Changes    Path
  1.9       +11 -7     p5ee/App-Widget/lib/App/Widget.pm
  
  Index: Widget.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Widget/lib/App/Widget.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Widget.pm 28 Oct 2005 17:18:54 -0000      1.8
  +++ Widget.pm 28 Feb 2006 22:02:31 -0000      1.9
  @@ -418,11 +418,15 @@
   sub html_escape {
       &App::sub_entry if ($App::trace);
       my ($self, $text) = @_;
  -    return "" if (!defined $text || $text eq "");
  -    $text =~ s{&}{&}gso;
  -    $text =~ s{<}{&lt;}gso;
  -    $text =~ s{>}{&gt;}gso;
  -    $text =~ s{\"}{&quot;}gso;
  +    if (!defined $text) {
  +        $text = "";
  +    }
  +    elsif ($text) {
  +        $text =~ s{&}{&amp;}gso;
  +        $text =~ s{<}{&lt;}gso;
  +        $text =~ s{>}{&gt;}gso;
  +        $text =~ s{\"}{&quot;}gso;
  +    }
       &App::sub_exit($text) if ($App::trace);
       return $text;
   }
  
  
  

Reply via email to