slateToHtml breaks accented characters (such as "č", "š")

default discord avatar
hobyte
last month
1

Hello there,


we are using the

https://github.com/thompsonsj/slate-serializers

to serialize Slate JSON to Html.


But unfortunately, it breaks accented characters, such as "č" and "š".


Has anyone dealt with this before and would be able to point us towards a fix?



It basically turns this:


[{"children":[{"text":"Co je AestheFill®?"}]},{"children":[{"text":"AestheFill je bezpečné plnivo s tvorbou kolagenu a dlouhotrvajícím účinkem. Používá se k obnovení objemu obličeje na dobu 24 měsíců."}]},{"children":[{"text":""}]}]


into this:


Co je AestheFill®?AestheFill je bezpečné plnivo s tvorbou kolagenu a dlouhotrvajícím účinkem. Používá se k obnovení objemu obličeje na dobu 24 měsíců.



We solved this by just implementing the serialization example from Payload docs (

https://payloadcms.com/docs/fields/rich-text

).

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.