From d9813946dc28d8c28033a68b68300b9d9eda115c Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Wed, 7 Mar 2012 19:22:05 -0800 Subject: Image data fix on Open Fixed a bug with data-uris not opening correctly. --- js/document/html-document.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'js/document') diff --git a/js/document/html-document.js b/js/document/html-document.js index a05219bc..b9b68972 100755 --- a/js/document/html-document.js +++ b/js/document/html-document.js @@ -451,9 +451,12 @@ exports.HTMLDocument = Montage.create(TextDocument, { // function ninjaUrlPrepend (url) { var docRootUrl = this.application.ninja.coreIoApi.rootUrl+escape((this.application.ninja.documentController.documentHackReference.root.split(this.application.ninja.coreIoApi.cloudData.root)[1]).replace(/\/\//gi, '/')); - return '"'+docRootUrl+url.replace(/\"/gi, '')+'"'; + if (url.indexOf('data:image') !== -1) { + return url; + } else { + return '"'+docRootUrl+url.replace(/\"/gi, '')+'"'; + } } - //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3