Open Bug 1768019 Opened 2 years ago Updated 2 years ago

Display HTML parsing errors/warnings in the inspector

Categories

(DevTools :: Inspector, enhancement, P5)

enhancement

Tracking

(Not tracked)

People

(Reporter: jdescottes, Unassigned)

References

Details

Take the following page: https://html-validation-errors.glitch.me/

The HTML is

<html>
<body>
Test File >< abd
</body>
<html>

Note that ">" and "<" are not encoded. The inspector loses this information. The markupview will simply show <body>Test File >< abd</body>, while Edit as HTML used on the body element will show

<body>
Test File &gt;&lt; abd
</body>

As far as the inspector is concerned, the characters are encoded and we don't show the HTML parsing issue anywhere.

If you use "View source" you will notice that the ">" "<" show a light red underscore. Hovering it will show a tooltip Bad character after "<". Probably cause: Unescaped "<". Try escaping it as "&lt;".

It could be nice to have a side panel in the inspector listing those errors. We don't think it would be easy to link back those errors the current DOM tree, but the information could still be valuable.

You'd need to introduce a sink other than mViewSource for these for the tokenizer and for these for the tree builder.

You need to log in before you can comment on or make changes to this bug.