Escaping # in literals

I know when in a cfoutput you have to double hash to output one hash

<cfoutput>##123</cfoutput> <!--- outputs #123 --->

But I was surprised that I had to double hash this

people2 = people.filter(function(row,rowNumber,recordset){
    return ( Left(row.hash, 1) != '##');

Also, in creating th Giist I alos found I needed to do the same in QueryNew

Is this a bug?

No, not a bug. I guess I’m kind of shocked you haven’t encountered this before? CFML has always been like this (for the 15 years I’ve been using it).

Do I think it’s stupid when ‘#ABC’ can’t possibly be a variable reference? Sure. But it’s a simple and consistent rule.

oh yeah, of course - for some reason I must have thought scripting would be different.

Ah yes, I can see the logic in that line of thinking - no cfoutput. I guess I’d always thought of it more in terms of execution context: in tags, no cfoutput means you don’t evaluate expressions, but in script you have evaluation enabled all the time.