Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Unified Diff: ui/file_manager/file_manager/common/js/mock_entry.js

Issue 954943006: Ensure the destination url reported to ImportHistory is correctly encoded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/file_manager/common/js/mock_entry.js
diff --git a/ui/file_manager/file_manager/common/js/mock_entry.js b/ui/file_manager/file_manager/common/js/mock_entry.js
index 7f3515529380cb33e0652ba7f3bf13b0f86d1c67..290b11e7097580dab3269e71de5fb39706ba338b 100644
--- a/ui/file_manager/file_manager/common/js/mock_entry.js
+++ b/ui/file_manager/file_manager/common/js/mock_entry.js
@@ -109,7 +109,12 @@ MockEntry.prototype = {
* @return {string} Fake URL.
*/
MockEntry.prototype.toURL = function() {
- return this.filesystem.rootURL + this.fullPath;
+ var segments = this.fullPath.split('/');
+ for (var i = 0; i < segments.length; i++) {
+ segments[i] = encodeURIComponent(segments[i]);
+ }
+
+ return this.filesystem.rootURL + segments.join('/');
};
/**

Powered by Google App Engine
This is Rietveld 408576698