Skip to content

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

@chromalchemy

Description

@chromalchemy

Reverted to 661281f 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions