diff options
author | Jose Antonio Marquez | 2012-06-07 15:09:16 -0700 |
---|---|---|
committer | Jose Antonio Marquez | 2012-06-07 15:09:16 -0700 |
commit | 5f780df3b5410386f9cf7691ebdf05969770759f (patch) | |
tree | dd5ba0e1088bf89b61202386e12964592fd70bf3 | |
parent | 1698e3b0c99ff972da61d915074f1f7f1646f641 (diff) | |
download | ninja-5f780df3b5410386f9cf7691ebdf05969770759f.tar.gz |
Minor fixes
Ensuring montage style is removed and doctype is included.
-rwxr-xr-x | js/document/mediators/template.js | 4 |
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) { |