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] ______________________________________________________________________ Get the mailserver that powers this list at http://www.coolfusion.com 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