[interchange-cvs] interchange - heins modified lib/Vend/Interpolate.pm
interchange-core@icdevgroup.org
interchange-core@icdevgroup.org
Sat Sep 28 00:28:00 2002
User: heins
Date: 2002-09-28 04:27:01 GMT
Modified: lib/Vend Interpolate.pm
Log:
* Add urldecode filter.
Revision Changes Path
2.115 +7 -2 interchange/lib/Vend/Interpolate.pm
rev 2.115, prev_rev 2.114
Index: Interpolate.pm
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /var/cvs/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.114
retrieving revision 2.115
diff -u -r2.114 -r2.115
--- Interpolate.pm 27 Sep 2002 05:52:43 -0000 2.114
+++ Interpolate.pm 28 Sep 2002 04:27:01 -0000 2.115
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#=20
-# $Id: Interpolate.pm,v 2.114 2002/09/27 05:52:43 mheins Exp $
+# $Id: Interpolate.pm,v 2.115 2002/09/28 04:27:01 mheins Exp $
#
# Copyright (C) 1996-2002 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA =3D qw(Exporter);
=20
-$VERSION =3D substr(q$Revision: 2.114 $, 10);
+$VERSION =3D substr(q$Revision: 2.115 $, 10);
=20
@EXPORT =3D qw (
=20
@@ -1092,6 +1092,11 @@
$val =3D~ s!\r\r!<P>!g;
$val =3D~ s!\r?\n!<BR>!g;
$val =3D~ s!\r!<BR>!g;
+ return $val;
+ },
+ 'urldecode' =3D> sub {
+ my $val =3D shift;
+ $val =3D~ s|\%([a-fA-F0-9][a-fA-F0-9])|chr(hex($1))|eg;
return $val;
},
'urlencode' =3D> sub {