Why does firebug translate character entity references to characters?

28 views
Skip to first unread message

Scott Jacobsen

unread,
Aug 5, 2013, 7:12:19 PM8/5/13
to fir...@googlegroups.com
Given this html:

<html>
<body>
Should see the character entity reference here, not the less than glyph &lt;
</body>
</html>

Firebug's html viewer displays:

<html>
<body>
Should see the character entity reference here, not the less than glyph <
</body>
</html>

Expected display would be:

<html>
<body>
Should see the character entity reference here, not the less than glyph &lt;
</body>
</html>

Firebug's html view translates the &lt; reference to the '<' character. A source viewer should not do that. It hides certain errors in the html that you can then only find using a different source viewer.

Is this a bug?

Sebastian Zartner

unread,
Aug 6, 2013, 4:36:47 AM8/6/13
to fir...@googlegroups.com
The HTML panel displays a live view, i.e. the contents as they are interpreted by the browser, not a source view.
Firefox automatically corrects HTML entities that are missing a semicolon and doesn't provide any info that the entity was incorrectly defined.
So to find such errors, you'll need to search within your IDE. You may also want to create an enhancement request at Mozilla, so that they they throw an error message in such cases.

Sebastian
Reply all
Reply to author
Forward
0 new messages