View selection source is very strict about errors

NEW
Unassigned

Status

()

Core
HTML: Parser
7 years ago
6 years ago

People

(Reporter: mrbkap, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
Steps to reproduce:
1. Select some text
2. Right click to bring up the context menu
3. Select "View Selected Source"

Things to notice:
* The first tag is an error (because we were expecting a doctype as the first tag).
* Containment errors don't make sense.

We should probably disable error reporting in view selection source, especially since the source should be well formed (since this is a serialized DOM that's being displayed, which means that any errors should have already been fixed up by the parser).
This needs a mechanism that allows the View Source back end discover that we are viewing selection source.
(Reporter)

Comment 2

7 years ago
One method would be to use a special MIME type for the data: URL that is currently used to do view selection source. bz suggested that we could add a type parameter to the data URL, but that requires fixing bug 532230 first.
You need to log in before you can comment on or make changes to this bug.