barisusakli 8 years ago
parent 31ac72375f
commit a3cbe5e090

@ -85,7 +85,9 @@ module.exports = function (middleware) {
translate(str, req, res, next);
},
function (translated, next) {
translated = translated.replace('<script id="ajaxify-data"></script>', '<script id="ajaxify-data" type="application/json">' + ajaxifyData + '</script>');
translated = translated.replace('<script id="ajaxify-data"></script>', function() {
return '<script id="ajaxify-data" type="application/json">' + ajaxifyData + '</script>';
});
next(null, translated);
}
], fn);

Loading…
Cancel
Save