mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 17:16:14 +01:00
closes #3815
This commit is contained in:
@@ -45,13 +45,15 @@ module.exports = function(middleware) {
|
||||
fn = defaultFn;
|
||||
}
|
||||
|
||||
var ajaxifyData = encodeURIComponent(JSON.stringify(options));
|
||||
var ajaxifyData = JSON.stringify(options);
|
||||
|
||||
render.call(self, template, options, function(err, str) {
|
||||
if (err) {
|
||||
return fn(err);
|
||||
}
|
||||
|
||||
str = str + '<script id="ajaxify-data" type="application/json">' + ajaxifyData + '</script>';
|
||||
|
||||
str = str + '<input type="hidden" ajaxify-data="' + ajaxifyData + '" />';
|
||||
str = (res.locals.postHeader ? res.locals.postHeader : '') + str + (res.locals.preFooter ? res.locals.preFooter : '');
|
||||
|
||||
if (res.locals.footer) {
|
||||
|
||||
Reference in New Issue
Block a user