Bug 18372
Summary: | data: urls are escaped | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Roman <eroman> |
Component: | WebCore Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | annevk, ap, mitz |
Priority: | P2 | ||
Version: | 525.x (Safari 3.1) | ||
Hardware: | PC | ||
OS: | OS X 10.5 |
Eric Roman
data:urls are canonicalized in webcore by url-escaping their contents.
neither Firefox nor Opera do this (which makes this a compatibility issue)
i would argue that webcore should not url-escape either.
it is also probably better on performance and memory consumption (especially for large data:urls) not to do this escaping business, since really the intent is to use it as data anyway.
Here is a small example to repro the problem:
<html>
<a href="data:text/html,<p>test</p>" onclick="alert(this.href); return false">Click Me</a>
</html>
This opens an alert, which outputs differently in each browser:
[Safari] data:text/html,%3Cp%3Etest%3C/p%3E
[Firefox] data:text/html,<p>test</p>
[Opera] data:text/html,<p>test</p>
[IE8*] data:text/html,<p>test</p>
*even so, IE8 doesn't actually support data:urls
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Eric Seidel (no email)
Unless I'm missing something, it looks like the example you gave looks the same in all browsers *except* Safari.
Eric Roman
Yes that is right, Safari is the only one that is url-escaping it.
Anne van Kesteren
This was fixed by the URL rewrite presumably. Comment 0 no longer reproduces.