> -- It is a rather sneaky gotcha' and no one seems to care-- Everyone 
> (almost) seems to be saying "yeah, so what?  That's TECHINCALLY right."

Which happens to be one of my biggest peeves... Like the guys who say
that javascript is "technically correct" when you ask it to perform 10/1
or some similar division and it spits back a number with a long decimal
value. It's "technically correct!" -- forget that it's basically useless... 

> This whole conversation has reminded me of programmers diligently
> defending their code by insisting "But, it's working as designed!!!".
> Meanwhile, the users are saying, "That's great, but it still doesn't
> help us solve the problem."

Yeah, what Cooper talks about in Inmates. 

> Maybe I should write a udf to sanitize strings to be safe for html
> script tags.  How does that sound?

That's what I did. I wrapped jsstringformat with a replace of "/" so
that they're all preceded by the \ escape character -- which is proper
escaping in javascript, so it solves the problem, always works, and
never causes any new problems. I do think it escapes more characters
than SerializeJSON does tho -- I haven't looked specifically, but for
example if there's an http url in it, it turns it into http:\/\/ which I
don't think SerializeJSON does... but that's fine since the it doesn't
hurt anything to escape those characters... I suspect there's a PHP
function that does it that way too, because I remember seeing some url's
in some javascript created by PHP that looked like that a while back. 



-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
     ph: 503.236.3691

http://onTap.riaforge.org/blog



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295668
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to