WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
214516
File constructor should replace all "/" chars with ":" in passed name
https://bugs.webkit.org/show_bug.cgi?id=214516
Summary
File constructor should replace all "/" chars with ":" in passed name
Irakli Gozalishvili
Reported
2020-07-18 02:00:04 PDT
According to the web File spec
https://www.w3.org/TR/FileAPI/#file-constructor
passed name should be normalized by replacing all `/` chars with `:` (quoting relevant fragment below)
> Let n be a new string of the same size as the fileName argument to the constructor. Copy every character from fileName to n, replacing any "/" character (U+002F SOLIDUS) with a ":" (U+003A COLON).
Safari does not seem to escape `/` characters. Running following code produces `foo/bar` ``` new File([], 'foo/bar').name // => "foo/bar" ``` While according to the spec it should produce `foo:bar`. Firefox seems to behave according to specification: Chrome seems to exhibit same bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1107071
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-07-18 10:44:45 PDT
<
rdar://problem/65770796
>
Ahmad Saleem
Comment 2
2022-08-09 13:02:02 PDT
Spec agreed that no special treatment need to be performed:
https://github.com/w3c/FileAPI/issues/41
Commit -
https://github.com/w3c/FileAPI/commit/a7f27059f04dfe81d2b58c516549fd7004cf5e29
*** Using below: console.log(new File([], '/').name); All browsers (Chrome Canary 106, Firefox Nightly 105 and Safari 15.6) generate "/" in console. Since all browsers match and spec are changed, I am going to mark this as "RESOLVED WONTFIX". Thanks!
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug