Bug 111528
| Summary: | View Source does not show trailing truncated tags | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | David Benjamin <davidben> |
| Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | UNCONFIRMED | ||
| Severity: | Normal | CC: | abarth, eric, hsivonen |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
David Benjamin
This is pretty minor, but if you view source on a file like:
Blah blah
<b
The "<b" gets lost in View Source (tested in Chrome). I didn't look too closely at the details, but it seems this comes from View Source being based on the HTML tokenizer. If you get an EOF in the "tag name state", no token is emitted for the truncated tag and instead it goes straight to emitting an EOF token.
http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tag-name-state
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Eric Seidel (no email)
I think we could add a test for this with "failing" expectations and close this. I don't think we plan to change this behavior anytime soon. :) There are strong advantages to using the real HTML parser for view source. I guess in this case we could special case EOF and check if there were any dropped chars from the last token.
Adam Barth
Maybe the SourceTracker can help us get any leftover source from an incomplete last token?
Henri Sivonen
FWIW, using a real HTML parser for View Source doesn't mean that you have to drop a trailing partial tag on the floor in the source view. See Gecko. :-)