Bug 19193 - data:// URLs should not inherit charset from parent frame
Summary: data:// URLs should not inherit charset from parent frame
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-22 09:43 PDT by Alexey Proskuryakov
Modified: 2023-12-20 07:49 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2008-05-22 09:43:26 PDT
In Firefox, data:// URLs do not inherit charset from parent frame. This is important because of cases such as <iframe src="data:image/svg+xml,..."> - the URL should be decoded as UTF-8 for correct round-tripping.

On Leopard, this is currently masked by <rdar://problem/5845875> -[NSURLResponse textEncoding] incorrectly reports us-ascii encoding for data: URLs. Yet, we can fix this for other operating systems.
Comment 1 Ahmad Saleem 2023-09-16 15:19:38 PDT
@Anne & @Alexey - Is this still applicable?
Comment 2 Alexey Proskuryakov 2023-09-18 08:07:35 PDT
FWIW, <rdar://problem/5845875> was fixed a long time ago. Other than that, I do not remember much about this, would need to investigate.
Comment 3 Anne van Kesteren 2023-09-18 09:04:32 PDT
I cannot reproduce inheritance with this test case:

data:text/html;charset=utf-8,%FF?%FF%3Ciframe%20src=%22data:text/html,%25FF?%25FF%22%3E

In particular the inner document shows ÿs as expected (and the outer �s).

Similar result here with a non-data: URL as top-level document:

http://software.hixie.ch/utilities/js/live-dom-viewer/saved/12013

I'd be inclined to close this as CONFIGURATION CHANGED based on that.