From f46c8199567929f20ea7ebeccf08bbb4e43f6994 Mon Sep 17 00:00:00 2001 From: tms Date: Sun, 3 Mar 2013 10:47:40 -0500 Subject: [PATCH] Don't double-up on #main-outlet when static content is rendered through Ember --- .../javascripts/discourse/controllers/static_controller.js | 3 ++- app/views/layouts/application.html.erb | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/controllers/static_controller.js b/app/assets/javascripts/discourse/controllers/static_controller.js index 9856f880db7..130478df274 100644 --- a/app/assets/javascripts/discourse/controllers/static_controller.js +++ b/app/assets/javascripts/discourse/controllers/static_controller.js @@ -18,7 +18,8 @@ Discourse.StaticController = Discourse.Controller.extend({ $preloaded = $("noscript[data-path=\"" + path + "\"]"); if ($preloaded.length) { text = $preloaded.text(); - text = text.replace(//, ''); + text = text.match(/((?:.|[\n\r])*)/); + text = text[1]; return this.set('content', text); } else { return jQuery.ajax({ diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index e1b44ca5b54..718c76f08fa 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -40,7 +40,9 @@
+ <%= yield %> +