mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 10:06:13 +01:00
closes #5436
This commit is contained in:
@@ -78,14 +78,15 @@ module.exports = function (middleware) {
|
|||||||
function (results, next) {
|
function (results, next) {
|
||||||
var str = results.header +
|
var str = results.header +
|
||||||
(res.locals.postHeader || '') +
|
(res.locals.postHeader || '') +
|
||||||
results.content +
|
results.content + '<script id="ajaxify-data"></script>' +
|
||||||
(res.locals.preFooter || '') +
|
(res.locals.preFooter || '') +
|
||||||
results.footer;
|
results.footer;
|
||||||
|
|
||||||
translate(str, req, res, next);
|
translate(str, req, res, next);
|
||||||
},
|
},
|
||||||
function (translated, next) {
|
function (translated, next) {
|
||||||
next(null, translated + '<script id="ajaxify-data" type="application/json">' + ajaxifyData + '</script>');
|
translated = translated.replace('<script id="ajaxify-data"></script>', '<script id="ajaxify-data" type="application/json">' + ajaxifyData + '</script>');
|
||||||
|
next(null, translated);
|
||||||
}
|
}
|
||||||
], fn);
|
], fn);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user