html
html copied to clipboard
question: embedding raw html
Hey, I want to use this as the main driver for generating my html, but I also have some markdown-based content that needs to be rendered. I can render it fine to valid html, but I cannot really find how I would embed this within an existing element.
So I'd like something like:
use html::text_content::OrderedList;
let tree = OrderedList::builder()
.raw_html(&my_content)
.build();
Just wondering if this is not implemented or if it is and I just can't find it :)
The .text()
function allows you to put text into an element, which is not currently escaped. See https://github.com/yoshuawuyts/html/issues/12 for a discussion of whether it should be escaped.