Alan Knowles wrote:
> One thing to consider is changing json_encode to add a header
> Content-type: application/json (or x-javascript), unless the additional
> arguments are used..
> That way someone using the function to intermingle with HTML will be
> faced with the fact they have to encode the output, otherwise it breaks
> the page...
Now that sounds downright disruptive, and all the tutorials will say:
Use json_encode('foobar', NO_HEADERS) because the other way does weird
stuff to PHP scripts. :-)
--
Edward Z. Yang GnuPG: 0x869C48DA
HTML Purifier <http://htmlpurifier.org> Anti-XSS Filter
[[ 3FA8 E9A9 7385 B691 A6FC B3CB A933 BE7D 869C 48DA ]]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php