Fix bug where we sometimes outputted xml CDATA in json snippet.