mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
move arbitrary html content out of noscript and into the preloadstore
This commit is contained in:
@@ -2,13 +2,10 @@ Discourse.HtmlView = Ember.View.extend({
|
||||
|
||||
render: function(buffer) {
|
||||
var key = this.get("key"),
|
||||
noscript = $("noscript").text();
|
||||
htmlContent = PreloadStore.get("htmlContent");
|
||||
|
||||
if (noscript.length) {
|
||||
var regexp = new RegExp("<!-- " + key + ": -->((?:.|[\\n\\r])*)<!-- :" + key + " -->"),
|
||||
content = noscript.match(regexp)[1];
|
||||
|
||||
buffer.push(content);
|
||||
if (htmlContent && htmlContent[key] && htmlContent[key].length) {
|
||||
buffer.push(htmlContent[key]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user