Scott, Are you sure PreserveSingleQuotes(Trim(blah)) works in CF 4.5.x? If so, then the CFML parser was erroneously "optimized". I am guessing, and I have been known to be completely wrong with my guesses, they consolidated the "general addressing" and "complex expressions with functions" parse logic in CF 5 for performance reason.
I know from memory that PreserveSingleQuotes(a[b]) (i.e. with "general addressing") does not work in CF 4.5.x. It has been a while since I last coded for CF 4.5.x servers.... ;) Good luck! James Ang MedSeek, Inc. -----Original Message----- From: VAN VLIET, SCOTT E (SBCSI) [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:44 AM To: CF-Talk Subject: RE: PreserveSingleQuotes() - CF 5 Bug? This works in CF 4.5, though. What's changed from CF 4.5 to 5 to make this no longer work? -- SCOTT VAN VLIET SENIOR ANALYST SBC SERVICES, INC Tel: 858.886.3878 Fax: 858.653.6763 Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> -----Original Message----- From: James Ang [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 11:15 AM To: CF-Talk Subject: RE: PreserveSingleQuotes() - CF 5 Bug? 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] ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

