Chromium Code Reviews
DescriptionFix an issue when parsing extension from file name with white spaces
MimeTypeMap.getFileExtensionFromUrl() only works for encoded urls.
As a result, white space is not supported.
However, file name may contain white spaces.
This causes the method to return empty extensions.
Convert file name to encoded strings doesn't work directly.
For instance, URLEncoder.encode() converts white space to "+" instead of
"%20".
So this change just extract the extension from file name directly.
TBR=dfalcantara@chromium.org
BUG=637917
Review-Url: https://codereview.chromium.org/2338593002
Cr-Commit-Position: refs/heads/master@{#418130}
(cherry picked from commit 23ad64c72dc2f116a7b73c2d6803f449ebba2553)
Committed: https://chromium.googlesource.com/chromium/src/+/95f4ea1eea72472d729b1eed1da19d5505d2535a
Patch Set 1 #
Messages
Total messages: 2 (1 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||