dougm       02/03/25 10:45:23

  Modified:    .        Changes
               src/modules/perl Util.xs
               t/net/perl util.pl
  Log:
  backing out change: properly escape highbit chars in Apache::Utils::escape_html
  
  Revision  Changes    Path
  1.639     +0 -4      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.638
  retrieving revision 1.639
  diff -u -r1.638 -r1.639
  --- Changes   25 Mar 2002 02:57:59 -0000      1.638
  +++ Changes   25 Mar 2002 18:45:23 -0000      1.639
  @@ -26,10 +26,6 @@
   properly deal with $r->status codes (e.g. redirect) in
   Apache::RegistryNG [Geoff Young <[EMAIL PROTECTED]>]
   
  -properly escape highbit chars in Apache::Utils::escape_html
  -[Geoff Young <[EMAIL PROTECTED]>,
  -Robin Berjon <[EMAIL PROTECTED]>]
  -
   allow $r->auth_name and $r->auth_type to be set on win32
   [John Kelly <[EMAIL PROTECTED]>]
   
  
  
  
  1.11      +1 -8      modperl/src/modules/perl/Util.xs
  
  Index: Util.xs
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/Util.xs,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Util.xs   24 Mar 2002 21:57:53 -0000      1.10
  +++ Util.xs   25 Mar 2002 18:45:23 -0000      1.11
  @@ -32,9 +32,6 @@
       return sv;
   }
   
  -#define IS_HIGHBIT_CHAR(b) \
  -   ( (((unsigned char)(b)) > 126) && (((unsigned char)(b)) <= 255) )
  -
   static SV *my_escape_html(char *s)
   {
       int i, j;
  @@ -46,7 +43,7 @@
            j += 3;
        else if (s[i] == '&')
            j += 4;
  -        else if (s[i] == '"' || IS_HIGHBIT_CHAR(s[i]))
  +        else if (s[i] == '"')
            j += 5;
   
       if (j == 0)
  @@ -70,10 +67,6 @@
            memcpy(&SvPVX(x)[j], "&quot;", 6);
            j += 5;
        }
  -        else if (IS_HIGHBIT_CHAR(s[i])) {
  -            sprintf(&SvPVX(x)[j], "&#%d;", (unsigned char)s[i]);
  -            j += 5;
  -        }
        else
            SvPVX(x)[j] = s[i];
   
  
  
  
  1.13      +1 -5      modperl/t/net/perl/util.pl
  
  Index: util.pl
  ===================================================================
  RCS file: /home/cvs/modperl/t/net/perl/util.pl,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- util.pl   24 Mar 2002 21:57:53 -0000      1.12
  +++ util.pl   25 Mar 2002 18:45:23 -0000      1.13
  @@ -2,7 +2,7 @@
   use Apache::test;
   $|++;
   my $i = 0;
  -my $tests = 8;
  +my $tests = 7;
   
   my $r = shift;
   $r->send_http_header('text/plain');
  @@ -61,10 +61,6 @@
   </body>
   </html>
   EOF
  -
  -#XXX: this test could be more robust, but its better than nothing
  -my $c = Apache::Util::escape_html("\x8b");
  -test ++$i, $c =~ /^&\#\d{3,3}\;$/;
   
   my $txt = "No html tags in here at all";
   my $etxt = Apache::Util::escape_html($txt);
  
  
  


Reply via email to