I am having this exact same problem.
I can confirm that it's happening from Mac FF 3.6 as well. It's a 3.6 only thing. Even the 3.7 alphas seem to work, according to some people on IRC that I had try it out.
I can also confirm that the CDATA trick didn't work; I tried many variations. I also tried different DOCTYPES, etc.
I also have a horrible time reproducing it. It only happens about 30% of the time I load th page, even if I take the same steps each time w/r/t clearing the cache, restarting FF, etc. It's definitely a heisenbug. I can't produce a simple test case that works, either. The trigger conditions for this to happen must be pretty complex.
However, I have had some luck in fixing it. The key seems to be to kill the src=
. So for instance:
var someHTML = '<img src="' + item.url + '" />';
becomes:
var someHTML = '<img s'+'rc="' + item.url + '" />';
So far this seems to be helping, but it hasn't been long enough for me to be sure.
This problem is particularly insidious in my case; I have a JSON string that has 20 URLs in it, and FF 3.6 requests all 20 URLs (which are bogus urls but end up hitting the same page) within a split second and DoS's the server every time someone with FF 3.6 visits my site.
This is a very bad bug in FF. I think that a lot of webmasters have yet to even discover that it's happening, but I'd imagine that it's causing widespread problems.