From 5f780df3b5410386f9cf7691ebdf05969770759f Mon Sep 17 00:00:00 2001 From: Jose Antonio Marquez Date: Thu, 7 Jun 2012 15:09:16 -0700 Subject: Minor fixes Ensuring montage style is removed and doctype is included. --- js/document/mediators/template.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'js') 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, { wipeAttributes(htmlTagDoc); for (var m in htmlTagMem.attributes) { if (htmlTagMem.attributes[m].value) { - htmlTagDoc.setAttribute(htmlTagMem.attributes[m].name, htmlTagMem.attributes[m].value.replace(/ montage-app-bootstrapping/gi, '')); + htmlTagDoc.setAttribute(htmlTagMem.attributes[m].name, htmlTagMem.attributes[m].value.replace(/montage-app-bootstrapping/gi, '')); } } //Getting list of current nodes (Ninja DOM) @@ -609,6 +609,8 @@ exports.TemplateDocumentMediator = Montage.create(Component, { } else { 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)); } + //TODO: Remove, this is a temp hack + cleanHTML = '\n'+cleanHTML; // function parseNinjaRootUrl(url) { if (url.indexOf(this.application.ninja.coreIoApi.rootUrl) !== -1) { -- cgit v1.2.3