diff --git a/app/assets/javascripts/browser-update.js b/app/assets/javascripts/browser-update.js index c3e5c83b300..31a5b410f60 100644 --- a/app/assets/javascripts/browser-update.js +++ b/app/assets/javascripts/browser-update.js @@ -37,7 +37,7 @@ result += noscriptElements[i].childNodes[j].nodeValue; } - mainElement.innerHTML = result; + mainElement.outerHTML = result; break; } } diff --git a/app/views/layouts/_noscript_footer.html.erb b/app/views/layouts/_noscript_footer.html.erb new file mode 100644 index 00000000000..76770aaa049 --- /dev/null +++ b/app/views/layouts/_noscript_footer.html.erb @@ -0,0 +1,32 @@ + diff --git a/app/views/layouts/_noscript_header.html.erb b/app/views/layouts/_noscript_header.html.erb new file mode 100644 index 00000000000..5085644f178 --- /dev/null +++ b/app/views/layouts/_noscript_header.html.erb @@ -0,0 +1,5 @@ +
+ "> +

<%=SiteSetting.title%>

+
+
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 98b4fca1a5b..35893cc195f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -73,25 +73,15 @@ <%= render_google_tag_manager_body_code %> <%- unless customization_disabled? %> diff --git a/app/views/layouts/crawler.html.erb b/app/views/layouts/crawler.html.erb index 818c8a422b1..cc8c28779da 100644 --- a/app/views/layouts/crawler.html.erb +++ b/app/views/layouts/crawler.html.erb @@ -16,46 +16,11 @@ <%= theme_lookup("header") %> -
- "> -

<%=SiteSetting.title%>

-
-
-
+ <%= render partial: "layouts/noscript_header" %> +
<%= yield %>
- + <%= render partial: "layouts/noscript_footer" %> <%= theme_lookup("footer") %> <%= theme_lookup("body_tag") %> <% if show_browser_update? %>