liveview-native / live_view_native

A framework for building native applications with Phoenix LiveView
https://native.live/
MIT License
592 stars 23 forks source link

Fix attribute encoding #180

Closed bcardarella closed 5 months ago

bcardarella commented 5 months ago

Ensure deep map encodings

bcardarella commented 5 months ago

@carson-katri please note this change, the following:

<FooBar data={%{
  a: 1,
  b: 2
}} />

no longer encodes as: <FooBar data="{\"a\":1,\"b":2}" />

It will encode HTML entities so this will be: <FooBar data="{&quot;a&quot;:1,&quot;b&quot;:2}"/>

Any HTML decoder should decode the string just fine.