Didn't realize MX automatically escaped now...

-- 
mailto:[EMAIL PROTECTED]
Thursday, August 7, 2003, 4:50:50 PM, you wrote:

jh> <cfquery datasource="files" name="f">
jh> SELECT filename, desc
jh> FROM [results.txt]
jh> </cfquery>

jh> <cfloop query="f">
jh>         <cfif len(trim(f.filename)) NEQ 0>
jh>                 <cfquery datasource="seloc_cart">
jh>                 INSERT INTO NavContentOld (page, description)
jh>                 VALUES ('#f.filename#', '#preserveSingleQuotes(prettify(f.desc))#')
jh>                 </cfquery>
jh>         </cfif>
jh> </cfloop>

jh> I'm getting this error:

jh>  ColdFusion was looking at the following text:

jh> (

jh> The CFML compiler was processing:

jh>     * an expression beginning with "preserveSingleQuotes", on line 25, column 
53.This message is usually caused by a problem in the expressions structure.


jh>     I've stared at this for 10 minutes...and I can't see anything
jh>     wrong. Removing preserveSingleQuotes makes it bomb on a value with
jh>     a single quote...
    


jh>     The problem shouldn't be in the prettify function, but in case
jh>     someone sees something that I don't, here it is.

jh> function prettify(str) {
jh>         var str2 = '';
jh>         str2 = replace(str, "#chr(13)##chr(10)#","","ALL");
jh>         str2 = replace(str2, "&amp;","","ALL");
jh>         has2space = find("  ", str2, 1);
jh>         while(has2space NEQ 0) {
jh>                 str2 = replace(str2, "  ", " ","one");
jh>                 has2space = find("  ", str2, 1);
jh>         }
jh>         return str2;
jh> }    

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to