Field fetched through REST API contains ASCII version of special characters

Instead of this ASCII mess, it should simply be: “Who’s this?”

No, it should not.

If you make a OPTIONS request to the /wp-json/wp/v2/pages path, you’ll see the schema which defines all the fields that exist within a Page record, like so for the post title field, via JavaScript’s fetch():

  • Screenshot 2

  • Screenshot 1

Therefore, title.rendered is meant for display and thus, filters like wptexturize() ( which converts the ' to ’s ) are applied to the raw post title.

If you want to get the raw post title, you can use /wp/v2/pages?slug=about&context=edit, i.e. set the context parameter to edit, and read the raw title via title.raw, but authentication is required.

  • Alternate options (apart from disabling the texturize filters): filter the schema or modify the REST API response, or create a custom REST field which would return the raw title. But then, it is up to you to decide on the most appropriate option in your case. ✌

techhipbettruvabetnorabahisbahis forumutaraftarium24edueduedusedusedueduedusedueduedu