Show non ASCII spaces as their HTML entites in the markup-view
Categories
(DevTools :: Inspector, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: pbro, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: parity-chrome)
Attachments
(3 files)
Comment 1•9 years ago
|
||
Comment 3•9 years ago
|
||
Comment 4•9 years ago
|
||
Comment 5•9 years ago
|
||
Updated•9 years ago
|
Reporter | ||
Comment 8•6 years ago
|
||
Chrome DevTools seems to be doing what Henri said in comment 5:
The nbsp issue could be addressed by rendering space-like characters that aren't plain ASCII spaces with e.g. a gray background or maybe as a middle dot similarly to how word processor optionally show non-printing characters.
This appears to be the best we can do here, and would help reduce people's confusion considerably.
So let me move this bug back to DevTools and see if we can get that done.
Reporter | ||
Comment 9•6 years ago
|
||
This is to avoid cases where people are confused because they wrote
in their HTML documents but are not seeing this in the markup
view and spend a long time debugging a problem that might otherwise
be solved in seconds had they seen the entity in the inspector.
Chrome DevTools does this too, and the list of characters to replace
was actually copied from their source code here:
https://github.com/ChromeDevTools/devtools-frontend/blob/57f033561fe0d35b51e1c2825a466852cdc1ee4e/front_end/elements/ElementsTreeOutline.js#L1583
Note that is a bit special. The DOM is not the HTML. HTML is the
language used to write the document sent to the browser. The DOM
is the interpretation of that document after parsing. So entities
are gone from the DOM.
This only attempts to resurect some entities only because they often
are used. This does not actually loads the HTML document from the
server again to find the real entities and copy them from there.
And in fact this might be resurecting entities that were not even
part of the original HTML document.
But, this is what people need, and what Chrome does.
Reporter | ||
Updated•6 years ago
|
Comment 10•6 years ago
|
||
Note that also Firebug already allowed to display whitespace characters. ASCII ones with a dot and non-ASCII ones as HTML entities, among other display forms. It did so by using the nsIEntityConverter
API, which doesn't seem to exist anymore, unfortunately.
Sebastian
Updated•6 years ago
|
Updated•3 years ago
|
Description
•