Just to confirm, is it only affecting your test site on XF2, not XF1?
There shouldn't be anything fundamentally different with XF2's output here, but we've had a few reports of this. I do have a workaround that can be opted into via config.php, but I'd rather not have to do it. If possible, it'd be useful to get access (to edit PHP) to a test site where it's broken (but not affecting any production sites). I'm not sure if that's possible.