From baa9d992a1fc3eb99b53838d898970d7b2be2c65 Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Sat, 23 Jun 2012 20:21:27 -0700 Subject: 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. --- js/document/helpers/url-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js/document') 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, { //Getting file URI (not URL since we must load through I/O API) var css = {}, file; css.cssUrl = href.split(this.application.ninja.coreIoApi.rootUrl)[1]; - css.fileUri = this.application.ninja.coreIoApi.cloudData.root + css.cssUrl; + css.fileUri = this.application.ninja.coreIoApi.cloudData.root + unescape(css.cssUrl); //Loading data from CSS file file = this.application.ninja.coreIoApi.readFile({uri: css.fileUri}); //Checking for file to be writable on disk -- cgit v1.2.3