[interchange-cvs] interchange - heins modified 2 files
interchange-core@interchange.redhat.com
interchange-core@interchange.redhat.com
Thu Oct 18 12:32:00 2001
User: heins
Date: 2001-10-18 16:31:49 GMT
Modified: scripts interchange.PL
Modified: lib/Vend Interpolate.pm
Log:
* Fixes and good suggestions WRT restrict_html, from Kevin Walsh
<kevin@cursor.uk.com>. Added to both stable and devel.
Revision Changes Path
2.12 +3 -2 interchange/scripts/interchange.PL
rev 2.12, prev_rev 2.11
Index: interchange.PL
===================================================================
RCS file: /anon_cvs/repository/interchange/scripts/interchange.PL,v
retrieving revision 2.11
retrieving revision 2.12
diff -u -r2.11 -r2.12
--- interchange.PL 2001/10/18 05:39:36 2.11
+++ interchange.PL 2001/10/18 16:31:49 2.12
@@ -50,7 +50,7 @@
#
# Interchange version 4.9.0
#
-# $Id: interchange.PL,v 2.11 2001/10/18 05:39:36 mheins Exp $
+# $Id: interchange.PL,v 2.12 2001/10/18 16:31:49 mheins Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -1094,9 +1094,10 @@
$value = Vend::Interpolate::filter_value(
'restrict_html',
$value,
- $key,
+ undef,
@$restrict,
);
+ $::Values->{$key} = $value;
next;
}
$value =~ tr/<[//d;
2.22 +3 -3 interchange/lib/Vend/Interpolate.pm
rev 2.22, prev_rev 2.21
Index: Interpolate.pm
===================================================================
RCS file: /anon_cvs/repository/interchange/lib/Vend/Interpolate.pm,v
retrieving revision 2.21
retrieving revision 2.22
diff -u -r2.21 -r2.22
--- Interpolate.pm 2001/10/18 09:40:44 2.21
+++ Interpolate.pm 2001/10/18 16:31:49 2.22
@@ -1,6 +1,6 @@
# Vend::Interpolate - Interpret Interchange tags
#
-# $Id: Interpolate.pm,v 2.21 2001/10/18 09:40:44 mheins Exp $
+# $Id: Interpolate.pm,v 2.22 2001/10/18 16:31:49 mheins Exp $
#
# Copyright (C) 1996-2001 Red Hat, Inc. <interchange@redhat.com>
#
@@ -27,7 +27,7 @@
require Exporter;
@ISA = qw(Exporter);
-$VERSION = substr(q$Revision: 2.21 $, 10);
+$VERSION = substr(q$Revision: 2.22 $, 10);
@EXPORT = qw (
@@ -629,13 +629,13 @@
}
sub filter_value {
- my($filter, $value, $tag) = @_;
+ my($filter, $value, $tag, @passed_args) = @_;
#::logDebug("filter_value: filter='$filter' value='$value' tag='$tag'");
my @filters = Text::ParseWords::shellwords($filter);
my @args;
for (@filters) {
next unless length($_);
- @args = ();
+ @args = @passed_args;
if(/%/) {
$value = sprintf($_, $value);
next;
@@ -1193,7 +1193,7 @@
my $val = shift;
shift;
my %allowed;
- @allowed{@_} = @_;
+ $allowed{lc $_} = 1 for @_;
$val =~ s{<(/?(\w[-\w]*)[\s>])}
{ ($allowed{lc $2} ? '<' : '<') . $1 }ge;
return $val;