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 %> +