A platform for community discussion. Free, open, simple.
DEV: Make index.html a valid html (#23289)
Jarek Radosz6f1d666323b3
diff --git a/app/assets/javascripts/bootstrap-json/index.js b/app/assets/javascripts/bootstrap-json/index.jsindex 3e7408e0193..eac1e3fbf0a 100644--- a/app/assets/javascripts/bootstrap-json/index.js+++ b/app/assets/javascripts/bootstrap-json/index.js@@ -206,7 +206,14 @@ function replaceIn(bootstrap, template, id, headers, baseURL) {BUILDERS[id](buffer, bootstrap, headers, baseURL);let contents = buffer.filter((b) => b && b.length > 0).join("\n");- return template.replace(`<bootstrap-content key="${id}">`, contents);+ if (id === "html-tag") {+ return template.replace(`<html>`, contents);+ } else {+ return template.replace(+ `<bootstrap-content key="${id}"></bootstrap-content>`,+ contents+ );+ }}function extractPreloadJson(html) {diff --git a/app/assets/javascripts/discourse/app/index.html b/app/assets/javascripts/discourse/app/index.htmlindex 5ba9b1d2455..6cb6f952edb 100644--- a/app/assets/javascripts/discourse/app/index.html+++ b/app/assets/javascripts/discourse/app/index.html@@ -1,6 +1,5 @@<!DOCTYPE html>--<bootstrap-content key="html-tag">+<html><head><!--👋 Greetings Discourse Developer. This HTML was generated by the ember-cli proxy. If you're looking for@@ -13,10 +12,10 @@<meta name="description" content=""><meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, user-scalable=yes, viewport-fit=cover">- <bootstrap-content key="before-script-load">+ <bootstrap-content key="before-script-load"></bootstrap-content>{{content-for "before-script-load"}}- <bootstrap-content key="discourse-preload-stylesheets">+ <bootstrap-content key="discourse-preload-stylesheets"></bootstrap-content>{{content-for "discourse-preload-stylesheets"}}<link integrity="" rel="stylesheet" href="{{rootURL}}assets/vendor.css" />@@ -27,32 +26,32 @@<ember-auto-import-scripts defer entrypoint="app"></ember-auto-import-scripts>- <bootstrap-content key="head">+ <bootstrap-content key="head"></bootstrap-content>{{content-for "head"}}</head><body><discourse-assets><discourse-assets-stylesheets>- <bootstrap-content key="discourse-stylesheets">+ <bootstrap-content key="discourse-stylesheets"></bootstrap-content>{{content-for "discourse-stylesheets"}}</discourse-assets-stylesheets><discourse-assets-json>- <bootstrap-content key="preloaded">+ <bootstrap-content key="preloaded"></bootstrap-content></discourse-assets-json><discourse-assets-icons></discourse-assets-icons></discourse-assets>- <bootstrap-content key="body">+ <bootstrap-content key="body"></bootstrap-content>{{content-for "body"}}<section id='main'></section>- <bootstrap-content key="hidden-login-form">+ <bootstrap-content key="hidden-login-form"></bootstrap-content><script defer src="{{rootURL}}assets/start-discourse.js"></script>- <bootstrap-content key="body-footer">+ <bootstrap-content key="body-footer"></bootstrap-content>{{content-for "body-footer"}}</body></html>