aboutsummaryrefslogtreecommitdiff
path: root/js/document
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-23 20:21:27 -0700
committerJose Antonio Marquez2012-06-23 20:21:27 -0700
commitbaa9d992a1fc3eb99b53838d898970d7b2be2c65 (patch)
tree7f56611b94676df7dd2bf9d5144bf53fc197d7e9 /js/document
parent31278a8f3839a637f2e3bbe3541989f118e6a578 (diff)
downloadninja-baa9d992a1fc3eb99b53838d898970d7b2be2c65.tar.gz
Support for browser escaped file paths (CSS)
This fixes an issue with files located in folder with names/paths that the browser escapes, hence, caused a bug with the path passed to the cloud simulator and files not to be found. This does not require testing to merge. The fix is simple, addresses folder paths with spaces and such characters in which CSS files consumed by the HTML we open in design view.
Diffstat (limited to 'js/document')
-rwxr-xr-xjs/document/helpers/url-parser.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/document/helpers/url-parser.js b/js/document/helpers/url-parser.js
index 5e71d148..7bded27d 100755
--- a/js/document/helpers/url-parser.js
+++ b/js/document/helpers/url-parser.js
@@ -53,7 +53,7 @@ exports.UrlParser = Montage.create(Component, {
53 //Getting file URI (not URL since we must load through I/O API) 53 //Getting file URI (not URL since we must load through I/O API)
54 var css = {}, file; 54 var css = {}, file;
55 css.cssUrl = href.split(this.application.ninja.coreIoApi.rootUrl)[1]; 55 css.cssUrl = href.split(this.application.ninja.coreIoApi.rootUrl)[1];
56 css.fileUri = this.application.ninja.coreIoApi.cloudData.root + css.cssUrl; 56 css.fileUri = this.application.ninja.coreIoApi.cloudData.root + unescape(css.cssUrl);
57 //Loading data from CSS file 57 //Loading data from CSS file
58 file = this.application.ninja.coreIoApi.readFile({uri: css.fileUri}); 58 file = this.application.ninja.coreIoApi.readFile({uri: css.fileUri});
59 //Checking for file to be writable on disk 59 //Checking for file to be writable on disk