Bug 128020
| Summary: | <a>/<area>'s origin getter returns "null" rather than "" when URL cannot be parsed | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Maciej Stachowiak <mjs> |
| Component: | DOM | Assignee: | Anne van Kesteren <annevk> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | annevk, ap, karlcow, webkit-bug-importer |
| Priority: | P2 | Keywords: | BrowserCompat, InRadar |
| Version: | 528+ (Nightly build) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 128023 | ||
Maciej Stachowiak
The origin attribute returns null instead of empty on on invalid URL. The URL spec says to return empty.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Anne van Kesteren
This only applies to the <a> and <area> elements I think (not sure how to construct a URL or Location from a string that cannot be parsed as a URL), but it's still applicable and is probably not difficult to fix:
http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A...%3Cscript%3E%0Aa%3Ddocument.createElement(%22a%22)%3B%0Aa.href%3D%22https%3A%2F%2Ftest%3Atest%2F%22%3B%0Aw(a.origin)%3B%0A%3C%2Fscript%3E
Radar WebKit Bug Importer
<rdar://problem/114078288>
Anne van Kesteren
Pull request: https://github.com/WebKit/WebKit/pull/16830
EWS
Committed 267222@main (0e09f4e4a3b4): <https://commits.webkit.org/267222@main>
Reviewed commits have been landed. Closing PR #16830 and removing active labels.