@Daniel
Thanks for the link, that could tbe the answer because I'm using REST API to retrive the macro body, perhaps there's another step need to be done in order to display the content as XHTML format.
@Matthew
I'm using REST API to retrive the macro body, here's the snippet that does that:
module.exports = function(app, addon) {
app.get('/demo', addon.authenticate(), function (req, res) {
var macroHash = req.query.macroHash;
var pageId = req.query.pageId;
var pageVersion = req.query.pageVersion;
var macroBodyUri = '/rest/api/content/' + pageId + '/history/' + pageVersion + '/macro/hash/' + macroHash;
addon.httpClient(req).get({
uri: macroBodyUri
}, function(err, response, body) {
if (err) {
console.log(error);
} else {
macro = JSON.parse(body);
res.render('template', {
body: macro.body,
});
}
});
});
}
Also FYI, currently I'm using `staticContentMacros` to render the macro, haven't explore `dynamicContentMacros` yet, could this be the reason that the content is not able to render in XHTML format?