aboutsummaryrefslogtreecommitdiff
path: root/js/document/mediators
diff options
context:
space:
mode:
Diffstat (limited to 'js/document/mediators')
-rwxr-xr-xjs/document/mediators/template.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/document/mediators/template.js b/js/document/mediators/template.js
index 5692ca2d..560f8c45 100755
--- a/js/document/mediators/template.js
+++ b/js/document/mediators/template.js
@@ -155,7 +155,7 @@ exports.TemplateDocumentMediator = Montage.create(Component, {
155 wipeAttributes(htmlTagDoc); 155 wipeAttributes(htmlTagDoc);
156 for (var m in htmlTagMem.attributes) { 156 for (var m in htmlTagMem.attributes) {
157 if (htmlTagMem.attributes[m].value) { 157 if (htmlTagMem.attributes[m].value) {
158 htmlTagDoc.setAttribute(htmlTagMem.attributes[m].name, htmlTagMem.attributes[m].value.replace(/ montage-app-bootstrapping/gi, '')); 158 htmlTagDoc.setAttribute(htmlTagMem.attributes[m].name, htmlTagMem.attributes[m].value.replace(/montage-app-bootstrapping/gi, ''));
159 } 159 }
160 } 160 }
161 //Getting list of current nodes (Ninja DOM) 161 //Getting list of current nodes (Ninja DOM)
@@ -609,6 +609,8 @@ exports.TemplateDocumentMediator = Montage.create(Component, {
609 } else { 609 } else {
610 cleanHTML = template.file.content.document.documentElement.outerHTML.replace(/(\b(?:(?:https?|ftp|file|[A-Za-z]+):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gi, parseNinjaRootUrl.bind(this)); 610 cleanHTML = template.file.content.document.documentElement.outerHTML.replace(/(\b(?:(?:https?|ftp|file|[A-Za-z]+):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$]))/gi, parseNinjaRootUrl.bind(this));
611 } 611 }
612 //TODO: Remove, this is a temp hack
613 cleanHTML = '<!DOCTYPE html>\n'+cleanHTML;
612 // 614 //
613 function parseNinjaRootUrl(url) { 615 function parseNinjaRootUrl(url) {
614 if (url.indexOf(this.application.ninja.coreIoApi.rootUrl) !== -1) { 616 if (url.indexOf(this.application.ninja.coreIoApi.rootUrl) !== -1) {