mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 02:44:33 +03:00
367c5b9639
refs https://github.com/TryGhost/Ghost/issues/9623 - add tests for undefined payloads in container cards - add guard for undefined payload in html card
14 lines
365 B
JavaScript
14 lines
365 B
JavaScript
module.exports = {
|
|
name: 'html',
|
|
type: 'dom',
|
|
render(opts) {
|
|
if (!opts.payload.html) {
|
|
return '';
|
|
}
|
|
|
|
// use the SimpleDOM document to create a raw HTML section.
|
|
// avoids parsing/rendering of potentially broken or unsupported HTML
|
|
return opts.env.dom.createRawHTMLSection(opts.payload.html);
|
|
}
|
|
};
|