From: Larry G. <Li...@IS...> - 2003-11-04 20:40:59
|
Ok, so I now understand the relationship of the '+' and space. The real answer was to escape the plus lies in 'sub ReadParse'. The format listed in web-lib.pl is: ReadParse([&assoc], [method], [noplus]) So all I needed to do is change from: ReadParse(); To: ReadParse(undef, undef, 2); That did the trick! I did not find the above format in either the online docs or Jamie's book. I only found it in web-lib.pl. --Larry > -----Original Message----- > From: Larry Gilson > Sent: Tuesday, November 04, 2003 2:51 PM > To: 'web...@li...' > Subject: FW: Problem with value assigned to text entry field > > > After reading ReadParse() in web-lib.pl, I assume the > replacement of a '+' with a space is by design. Can anyone > tell me why. I have spent some time trying to find out but > either I don't understand the answer or I have not found it > yet. More importantly, does anyone know how I can counter this. > > Thanks, > Larry > > > > -----Original Message----- > From: Larry Gilson > Sent: Monday, November 03, 2003 11:56 PM > To: 'web...@li...' > Subject: Problem with value assigned to text entry field > > > Hi All, > > Hopefully someone with more experience here might be able to > help me. This seems like a trivial problem but I just can't see it. > > I am trying to modify squidGuard regular expressions. The > file is read by read_file_lines(). It is properly output to > a hyper link. On selecting the hyperlink, the form data is > then read by &ReadParse(). No rocket science here. The odd > thing is that a '+' is substituted by a space. > > Example: > Hyperlink: (^|[-.\?+=/_0-9])(john|mary) > Script reads: (^|[-.\? =/_0-9])(john|mary) > > > > The hyperlink is created by the following (sorry for the wrap): > > print " <TD WIDTH=100%><A > HREF=\"edit_blexpr.cgi?blacklist=$in{'blacklist'}&entry=$entry > \"><TT>", > (length($entry) > 80) ? substr($entry, 0, > 80)."..." : $entry, > "</TT></A></TD>\n"; > > The variable in question is $entry. The script reading this > output refers to $in{'entry'}. > > Can anyone see what I am missing? > > > Thanks, > Larry > |