Closed Bug 410303 Opened 17 years ago Closed 17 years ago

closing / on img tags removed during rendering

Categories

(Firefox :: General, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 162653

People

(Reporter: bugzilla, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Install the html validator extension: http://users.skynet.be/mgueury/mozilla/ (it lets you see the source code post-render (right click on icon, advanced, validate now). When you view an xhtml 1.0 page sent as text/html (which is valid under the spec: http://www.w3.org/TR/xhtml1/#media as long as you specify doctype), firefox makes the page non-valid xhtml post-render by removing the closing img tag. i.e <img src="myimage.jpg" alt="my image"/> becomes <img src="myimage.jpg" alt="my image"> Reproducible: Always Steps to Reproduce: 1. Create an xhtml 1.0 strict page with images 2. Make your browser send the mime type text/html 3. Your page is actually invalid xhtml post-render Actual Results: You get invalid xhtml Expected Results: Your trailing / stays as part of the img tag. Why does this affect developers? Javascript modifies a lot of webpages and due-diligence with compatibility dictates that the code is both valid pre and post javascript events. Unfortunately when I use the html validator extension to extract the post-render source code from firefox, firefox has already mangled the true xhtml. There is no work around to this except knowing to ignore this validation error while developing websites.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
> When you view an xhtml 1.0 page sent as text/html (which is valid under the > spec: http://www.w3.org/TR/xhtml1/#media as long as you specify doctype) It's valid if you do that _and_ the document complies with Appendix C of the XHTML specification. And even then, all that's guaranteed is that anything complying with Appendix C will give about the same DOM no matter whether parsed as XHTML or tag-soup.
You need to log in before you can comment on or make changes to this bug.