This is pretty ugly (especially the code in `onopentagend`) and should probably fixed in the tokenizer, so there isn't an offset anymore. The current self-closing tag behavior is wrong anyway, as slashes should be ignored when they are followed by attributes.