mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-15 10:16:12 +01:00
closes #5942
This commit is contained in:
@@ -92,18 +92,19 @@ function renderWidget(widget, uid, options, callback) {
|
||||
}
|
||||
|
||||
if (widget.data.container && widget.data.container.match('{body}')) {
|
||||
translator.translate(widget.data.title, function (title) {
|
||||
Benchpress.compileParse(widget.data.container, {
|
||||
title: title,
|
||||
body: html,
|
||||
}, function (err, html) {
|
||||
next(err, { html: html });
|
||||
});
|
||||
});
|
||||
Benchpress.compileParse(widget.data.container, {
|
||||
title: widget.data.title,
|
||||
body: html,
|
||||
}, next);
|
||||
} else {
|
||||
next(null, { html: html });
|
||||
next(null, html);
|
||||
}
|
||||
},
|
||||
function (html, next) {
|
||||
translator.translate(html, function (translatedHtml) {
|
||||
next(null, { html: translatedHtml });
|
||||
});
|
||||
},
|
||||
], callback);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user