Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

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

default discord avatar
hobytelast year
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

).

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.