User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20060426 Firefox/22.214.171.124 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:126.96.36.199) Gecko/20060426 Firefox/188.8.131.52 When I have a short <b/>-tag (by short I mean a tag without end tag), the resulting DOM will have a <b> tag around every #text-Node. There also seems to be a memory leak related to that, as my firefox consumed 1GB of ram witch it didn't free after opening such a document. The document passes XHTML validation. Reproducible: Always Steps to Reproduce: 1. Open the attached XHTML-file 2. Open DOM Inspector and have a look at a #text-node
Invalid. If you send the page as text/html, it goes through the HTML parser. HTML does not have XML-style short tags, so <b/> is the same as <b>. The "extra" <b> elements you see in DOM Inspector are the result of a feature that makes block-in-inline tag soup content work (I think the feature is called "residual style"). If you actually make the page XHTML (which requires giving the root an xmlns and sending it as application/xhtml+xml), it works correctly. I think some browsers do support XML-style shorttags in text/html (Safari?), but I don't think we plan to. See bug 169592 or bug 268477. The excess memory consumption you saw was probably a result of residual style blowup: when the parser is halfway through a document with a bunch of unclosed inline style tags, each block tag results in a lot of nodes being created. I think this is N^2 but it might be exponential. If it actually leaks, or if it's exponential and you think it should be N^2, that's a bug you should file separately.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → INVALID
Summary: Short tags for <b/> cause <b>...</b> around all #text elements → Short tags for <b/> (in XHTML as text/html) cause <b>...</b> around all #text elements
There was some related discussion in bug 94284, but I don't know where the decision was made to not support XML-style short tags in text/html.
You need to log in before you can comment on or make changes to this bug.