slapos_jio: fixup! Render text/html as html on domsugar
Showing
... | @@ -11,19 +11,19 @@ | ... | @@ -11,19 +11,19 @@ |
}) | }) | ||
.onStateChange(function () { | .onStateChange(function () { | ||
var gadget = this, | var gadget = this, | ||
header_text = "By " + gadget.state.author + | header_text = "By <strong>" + gadget.state.author + | ||
" on " + gadget.state.modification_date + ":", | "</strong> on " + gadget.state.modification_date + ":", | ||
header = domsugar("div", { | header = domsugar("div", { | ||
class: "slapos-event-discussion-message-header" | class: "slapos-event-discussion-message-header" | ||
}, [ | }, [ | ||
domsugar('p', {text: header_text}) | domsugar('p', {html: header_text}) | ||
|
|||
]); | ]); | ||
if (gadget.state.content_type === 'text/html') { | if (gadget.state.content_type === 'text/html') { | ||
return domsugar(gadget.element, {}, [ | return domsugar(gadget.element, {}, [ | ||
header, | header, | ||
domsugar('div', { | domsugar('div', { | ||
class: "slapos-event-discussion-message-body", | class: "slapos-event-discussion-message-body", | ||
text: gadget.state.text_content | html: gadget.state.text_content | ||
|
|||
}) | }) | ||
]); | ]); | ||
} | } | ||
... | ... |