[Webkit-unassigned] [Bug 214516] New: File constructor should replace all "/" chars with ":" in passed name

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jul 18 02:00:04 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=214516

            Bug ID: 214516
           Summary: File constructor should replace all "/" chars with ":"
                    in passed name
           Product: WebKit
           Version: Safari 13
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: DOM
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: contact at gozala.io

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200718/0171ef81/attachment.htm>


More information about the webkit-unassigned mailing list