Defend against stack overflow due to overly deep nested (unclosed) XML tags
There are several ways to get Tor Browser crashed due to missing mitigations while dealing with overly deep nested XML tags (see: https://bugzilla.mozilla.org/show_bug.cgi?id=485941 for an example). For Mozilla this is just annoying but depending on the circumstances we might come to a different conclusion due to our different threat model.
We should try to come up with something that handles those cases more gracefully and in a less dangerous way.