This is a known bug. It was discovered at the latter stage of the CF5
Beta. I can't remember the engineer who worked with me to determine the
bug. But it is related to a bug in CFQUERY. You cannot have pounded
variables within CFQUERY that uses "general addressing" (the actual term
used by the Allaire engineer). A variable that is referenced via
"general addressing" has the square brackets in it. Examples are arrays,
structures, and queries referencing that looks like a[b].

For PreserveSingleQuotes(), you cannot have anything complex between the
parentheses such as an expression that requires the execution of a
function which in your case is Trim(). Keep your calls to
PreserveSingleQuotes() to the format: PreserveSingleQuotes(a) or
PreserveSingleQuotes(a.b.c.d)

I wonder if this is fixed in NEO....

Oh well. Got a project deadline to meet... :)

Good luck!

James Ang
MedSeek, Inc.

-----Original Message-----
From: VAN VLIET, SCOTT E (SBCSI) [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, March 21, 2002 10:24 AM
To: CF-Talk
Subject: PreserveSingleQuotes() - CF 5 Bug?


When nesting functions in the PreserveSingleQuotes() function, CF 5
throws an error.

EXAMPLE:

<cfset preservedInput = PreserveSingleQuotes(trim(form.inputfield))>

This throws the following error:

****************************************************************
Error Diagnostic Information
Just in time compilation error

Invalid parser construct found on line 27 at position 37. ColdFusion was
looking at the following text:

(

Invalid expression format. The usual cause is an error in the expression
structure.
****************************************************************

Is this a known bug?  If I pull out the trim and throw it into a
variable, it works.

EXAMPLE

<cfset trimmedInput = trim(form.inputfield)>
<cfset preservedInput = PreserveSingleQuotes(trimmedInput)>

Is this a known bug? Have any of you encountered this?

Thanks!

-- 
SCOTT VAN VLIET 
SENIOR ANALYST 
SBC SERVICES, INC 
Tel: 858.886.3878 
Fax: 858.653.6763 
Email: [EMAIL PROTECTED]

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to