Bug in sub hrefquote

Quezada, Alex Alex.Quezada at NielsenMedia.com
Fri Jul 23 07:07:35 PDT 2004

Date: Fri, 23 Jul 2004 00:15:51 +0300
From: VilleSkytt?<scop at FreeBSD.org>
Subject: Re: Bug in sub hrefquote
To: "'freebsd-cvsweb at freebsd.org'" <freebsd-cvsweb at freebsd.org>
Message-ID: <1090530951.29086.371.camel at bobcat.mine.nu>
Content-Type: text/plain

On Fri, 2004-07-16 at 18:09, Quezada, Alex wrote:

>Hi, and sorry for the delay,

>> 	this routine is incorrectly translating spaces into +:  
>> y/ /+/;
>> 	This is wrong, and if you have directories in your path that include
>> spaces, the link you get is wrong.  I have replaced this with a
>> of '%20', which works as expected.

>That change should be ok (see also below), but could you provide an
>exact reproducer for this?  Ie. name of the directory, the resulting
>link, where in the CVSweb UI it occurs, and the browser + version.  I've
>spotted a few places where hrefquote() is clearly used in a wrong way
>(<a name="..." in dir listings), but I haven't noticed any problems with
>whitespace in paths for a long time.

It happens in the download links (from either the log view or the markup
view) for files under a directory with spaces in it.  In my case, the
directory and file are:
/dstdir/src/stored procs/CntcEventsDailyCallsReport.sp

and the link ends up as:

I don't think the browser has any impact, unless there are some that will
change the '+' to '%20'.  I tried with IE 6.0 and Mozilla 1.5 with the same

>> 	There's probably other ways to do this (like urlencode), but this
>> seems simpler.

>I would like to get rid of hrefquote() altogether.  Will look into it

>> PS: I figured out my broken binary problem.  BEA Weblogic's cgi
>> was the culprit.  I installed Apache, and all is peachy now.

>What OS do you use?  It is possible that we need to add a few binmode()
>calls here and there.

This problem was running Weblogic 7.0 on a SunOS 5.8 box.  It uses a servlet
to interpret cgi scripts.


freebsd-cvsweb at freebsd.org mailing list
To unsubscribe, send any mail to "freebsd-cvsweb-unsubscribe at freebsd.org"

End of freebsd-cvsweb Digest, Vol 52, Issue 1

More information about the freebsd-cvsweb mailing list