[interchange-cvs] interchange - heins modified lib/Vend/Util.pm

interchange-cvs at icdevgroup.org interchange-cvs at icdevgroup.org
Sun Feb 29 15:18:39 EST 2004


User:      heins
Date:      2004-02-29 20:18:39 GMT
Modified:  lib/Vend Util.pm
Log:
* Don't add .html if the page reference is for a directory, avoids
  http://foo.com/cgi-bin/bar/directory/.html link.

Revision  Changes    Path
2.69      +3 -3      interchange/lib/Vend/Util.pm


rev 2.69, prev_rev 2.68
Index: Util.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Util.pm,v
retrieving revision 2.68
retrieving revision 2.69
diff -u -r2.68 -r2.69
--- Util.pm	11 Feb 2004 14:37:02 -0000	2.68
+++ Util.pm	29 Feb 2004 20:18:39 -0000	2.69
@@ -1,6 +1,6 @@
 # Vend::Util - Interchange utility functions
 #
-# $Id: Util.pm,v 2.68 2004/02/11 14:37:02 jon Exp $
+# $Id: Util.pm,v 2.69 2004/02/29 20:18:39 mheins Exp $
 # 
 # Copyright (C) 2002-2003 Interchange Development Group
 # Copyright (C) 1996-2002 Red Hat, Inc.
@@ -87,7 +87,7 @@
 use Vend::File;
 use subs qw(logError logGlobal);
 use vars qw($VERSION @EXPORT @EXPORT_OK);
-$VERSION = substr(q$Revision: 2.68 $, 10);
+$VERSION = substr(q$Revision: 2.69 $, 10);
 
 my $Eval_routine;
 my $Eval_routine_file;
@@ -1239,7 +1239,7 @@
 	$path = escape_chars_url($path)
 		if $path =~ $need_escape;
     	$r .= '/' . $path;
-	$r .= '.html' if $opt->{add_dot_html} and $r !~ /\.html?$/;
+	$r .= '.html' if $opt->{add_dot_html} and $r !~ m{(?:/|\.html?)$};
 
 	if($opt->{add_source} and $Vend::Session->{source}) {
 		my $sn = hexify($Vend::Session->{source});








More information about the interchange-cvs mailing list