hiccup
hiccup copied to clipboard
Update instruction on how to insert pre-rendered HTML
The README demonstrates how to insert pre-rendered HTML using the keyword ::hiccup/raw
, which only works in an older revision of the code. The newest version supports the keyword ::hiccup/unsafe-html
instead, so I've updated the README to use that.
I was looking at the docstrings for the lambdaisland.hiccup
namespace and for the render
function. Would it be helpful to mention this keyword in either of those places, as well?
@justindbelanger Thanks! This LGTM, but do you want to make the docstring changes in the same PR? The only reason I can think of to not do it is if @plexus has API changes in mind that would invalidate the docstring, but I doubt it.
No, not planning to change this again. I think "unsafe-html" is good to make it clear that if you reach for this that you should know the implications. It also rhymes with react's "dangerouslySetInnerHtml" (IIRC).
So yes, docstring updates would be much appreciated as well. Thanks a lot!
@justindbelanger If you ever want to come back and update the docstrings, that'd be great, but in the meantime, I thought I'd merge this. Thanks!