> The LiveDocs for CF7 simply state jsstringformat returns "A 
> string that is safe to use with JavaScript.".  I think it is 
> obvious that "</script>" is not a "safe" string under certain 
> JavaScript conditions.
> 
> Ok, so technically, "</script>" IS safe with JavaScript 
> alone-- but it isn't a "safe" string to have in JavaScript 
> which is embedded in an HTML
> document-- and most JavaScript is found in HTML documents.  I 
> don't think there's anything particularly wrong with your 
> exacting definition of the function-- what I'm asking here is 
> _should_ that be the way the function works?

Yes, that's how the function should work. The behavior you want is an edge
case, and it's something you can easily do yourself with a workaround.
However, making that the default behavior would require that CF know all of
the things that could cause a JavaScript literal string to cause problems in
every browser, including presumably those browsers which don't yet exist.

> You are absolutely right.  That was a simplified HTML example 
> to show the browser behavior.  Had you kept reading, you 
> would have seen the example which involved ColdFusion.

The second example is irrelevant. If you have the same problem with a
JavaScript literal string in a static HTML page, the fact that you can
generate such a string - which, as you note, is in fact a valid JavaScript
literal string - with CF doesn't make this a CF problem.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:295606
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to