ornament icon indicating copy to clipboard operation
ornament copied to clipboard

Defstyled component is not properly handling children when some of them are fragments with `unsafe-html`

Open chromalchemy opened this issue 1 month ago • 2 comments

Reverted to 661281f5aa7682cc4cb34a836e783ccb4841cda8 and it works as expected.

In my case i was rendering handlebars html.

Test case is something like:

(o/defstyled myelem :div)

 [:<>
   [:div.before-custom-elem]
   [myelem
    [:div.before-unsafe]
    [:<>
     [::hiccup/unsafe-html "{{open handlebars tag}}"]
     [:div.inside-unsafe]
     [::hiccup/unsafe-html "{{close handlebars tag}}"]]
    [:div.after-unsafe]]
   [:div.after-custom-elem]]

[:div.after-unsafe] was disappearing when rendering html.

Rendered to html with latest lambdaisland.hiccup Wanted to get this out there asap because this can silently break rendered html.

chromalchemy avatar Nov 02 '25 21:11 chromalchemy