help-gift
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [help-GIFT] Error in indexing: Attributes[1] too long


From: David Squire
Subject: Re: [help-GIFT] Error in indexing: Attributes[1] too long
Date: Sat, 15 May 2004 13:20:36 +1000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007

Chapman, Brian J. wrote:

Thanks, It appears that this is just some debugging information and not an 
actual limit on the string length.

What I am trying to figure out is why I am only getting a few random images 
displayed from the Viper php script. The gift server provides random 10 images 
as requested, however, the viper script displays anywhere from 0 to 10 images.

I found that some of the paths I am indexing have the "&" character in them. I know it is bad practice to use the "&" in the path, but this is an existing file system with users who do not know better.
Some digging into the code showed that spaces are converted into their hex 
equivalent in gift-add-collection.pl:

$i=~s[ ][%20]g;

Just adding another line(s):
         $i=~s[\&][%26]g;
         $i=~s[\#][%23]g;

should protect against the "&" (and "#" for URL problems) in the filename from 
causing xml parsing problems.
If we're going to fix this, we should use the CGI::Enurl package from CPAN and fix the problem for *all* problem characters.

Regards,

David


--
Dr. David McG. Squire, Postgraduate Research Coordinator (Caulfield),
Computer Science and Software Engineering, Monash University, Australia
http://www.csse.monash.edu.au/~davids/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]