aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-02-23 10:35:12 -0800
committerJose Antonio Marquez2012-02-23 10:35:58 -0800
commit14a8f4c4e373db213b3d42d30edaea8354ae57e3 (patch)
tree86004d258c2197e61a5a15918eb35817178205e3 /js
parentc8a5107fa6f85ad572cf0881ed7e222ac6fbacfc (diff)
downloadninja-14a8f4c4e373db213b3d42d30edaea8354ae57e3.tar.gz
Adding url clean up to HTML on save
Diffstat (limited to 'js')
-rw-r--r--js/mediators/io-mediator.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/mediators/io-mediator.js b/js/mediators/io-mediator.js
index 4dc29c3c..c4f3b361 100644
--- a/js/mediators/io-mediator.js
+++ b/js/mediators/io-mediator.js
@@ -205,7 +205,8 @@ exports.IoMediator = Montage.create(Component, {
205 template.document.content.document.head.innerHTML = template.head; 205 template.document.content.document.head.innerHTML = template.head;
206 //Getting all CSS (style or link) tags 206 //Getting all CSS (style or link) tags
207 var styletags = template.document.content.document.getElementsByTagName('style'), 207 var styletags = template.document.content.document.getElementsByTagName('style'),
208 linktags = template.document.content.document.getElementsByTagName('link'); 208 linktags = template.document.content.document.getElementsByTagName('link'),
209 url = new RegExp(window.location.protocol+'//'+window.location.host+'/js/document/templates/montage-html/', 'gi');
209 //Looping through link tags and removing file recreated elements 210 //Looping through link tags and removing file recreated elements
210 for (var j in styletags) { 211 for (var j in styletags) {
211 if (styletags[j].getAttribute) { 212 if (styletags[j].getAttribute) {
@@ -271,7 +272,7 @@ exports.IoMediator = Montage.create(Component, {
271 } 272 }
272 } 273 }
273 // 274 //
274 return template.document.content.document.documentElement.outerHTML; 275 return template.document.content.document.documentElement.outerHTML.replace(url, '');
275 } 276 }
276 }, 277 },
277 //////////////////////////////////////////////////////////////////// 278 ////////////////////////////////////////////////////////////////////