Hi guys
I’m also having the same issue.
I’m trying to make a custom API with register_rest_route() and some CPT (with CPT-UI Plugin) and, in the title of the post, if I put a “-” (hyphen) it shows a— (m-dash!) in the JSON. And shows – (n-dash!) (no mistake typing!) in the view source of the rendered Post.
While we’re at encoding, let me say it’s getting very dificcult to come up with a solution to clean all the html comments from the body text. I searched everywhere, tried every encoding, striping, and none is perfect.
The best, so far, was to put wp_strip_all_tags() in get_the_content() and show_in_Rest = false (which sounds weird) in the CPT Plugin options.
But I’m sure there is a better solution for this.. (I hope)