Open
Bug 1501612
Opened 6 years ago
Updated 2 years ago
Inspector converts HTML escape codes to their renderable counterparts
Categories
(DevTools :: Inspector, defect, P3)
Tracking
(Not tracked)
UNCONFIRMED
People
(Reporter: mgridinas, Unassigned)
References
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:62.0) Gecko/20100101 Firefox/62.0
Steps to reproduce:
I returned an escaped HTML string from my PHP Laravel backend via XmlHttpRequest interface and added it to DOM via `div.innerHTML` call.
Actual results:
HTML inspector converts `<`and every other escaped string to their renderable counterparts. The actual result is still available via `innerHTML` call from javascript console.
Expected results:
HTML inspector must have kept `<` and every other escape sequence as is.
Comment on attachment 9019621 [details]
The same result via javascript console
>https://media.discordapp.net/attachments/259374117696831489/504569490105827333/Screen_Shot_2018-10-24_at_11.18.47.png
Attachment #9019621 -
Attachment mime type: text/plain → image/png
Comment on attachment 9019621 [details]
The same result via javascript console
https://media.discordapp.net/attachments/259374117696831489/504569490105827333/Screen_Shot_2018-10-24_at_11.18.47.png
Attachment #9019621 -
Attachment mime type: image/png → text/plain
Comment 4•6 years ago
|
||
The escape sequences are decoded while parsing and stored in the DOM unescaped. That's normal.
Displaying unescaped content between items that look like tags is a potential UI issue in the dev tools but the display is ultimately a UI design decision.
Component: HTML: Parser → DOM
Product: Core → DevTools
It's misleading. How is it an UI design decision to mislead developers on purpose and have them to go through hoops to check what is exactly going on?
Comment 6•6 years ago
|
||
This looks like the Inspector panel related bug.
Honza
Component: DOM → Inspector
Comment 7•6 years ago
|
||
I am attempting to reproduce. It would be very helpful if you could provide a testcase -- ideally one that doesn't require a PHP backend.
Flags: needinfo?(mgridinas)
Certainly. I've reproduced the issue with the following snippet
<html>
<body>
<script>console.log(24)</script>
</body>
<html>
Currently running 66.0.5 on Windows 10 Home.
Flags: needinfo?(mgridinas)
Updated•6 years ago
|
Priority: -- → P3
Updated•3 years ago
|
Whiteboard: [devtools-triage]
Comment 9•3 years ago
|
||
We should file an enhancement to surface HTML parsing errors (based on what is provided in the view source UI).
Flags: needinfo?(jdescottes)
Whiteboard: [devtools-triage]
Updated•3 years ago
|
Updated•3 years ago
|
Flags: needinfo?(jdescottes)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•