We came across a weird bug in EE (specifically 1.6.8) where JSON in templates was getting axed by the template parser. Specifically, this hit us on Typedia when we were implementing the type specimens using SWFObject (lines wrapped for clarity):
swfobject.embedSWF( "/s/holder.swf?<?php echo rand(); ?>",
"{url_title}-specimen-small{embed:rand}", "110", "50", "8.0.0", false,
{sampleFile: '{file}', sampleName: '{url_title}', sampleSize: 'small'},
{menu: 'false', wmode: 'opaque'}, {id: '{url_title}-specimen-small{embed:rand}',
name: '{url_title}-specimen-small{embed:rand}', styleclass: 'small-specimen has-image'});was being sent to the browser as
swfobject.embedSWF("/s/holder.swf?<?php echo rand(); ?>", "{url_title}-specimen-small{embed:rand}",
"110", "50", "8.0.0", false, , , );To fix the issue, we forced some line breaks:
swfobject.embedSWF(
"/s/holder.swf?<?php echo rand(); ?>",
"{url_title}-specimen-small{embed:rand}", "110", "50", "8.0.0", false,
{
sampleFile: '{file}', sampleName: '{url_title}', sampleSize: 'small'
},
{
menu: 'false', wmode: 'opaque'
},
{
id: '{url_title}-specimen-small{embed:rand}',
name: '{url_title}-specimen-small{embed:rand}',
styleclass: 'small-specimen has-image'
});My guess is that the issue has something to do with a reprogrammed regular expression that is being a little too greedy, but that’s just a guess.
[Mod Edit: Moved to the Technical Support forum]