Quantcast
Channel: Question and Answer » json
Viewing all articles
Browse latest Browse all 148

WP REST API returns post image URL with double backslashes

$
0
0

I’m trying to create a mobile application that use WordPress as a backend CMS, i was able to get the JSON output using WP REST API and reuse what i need from the output in my application, but i have a problem where i’m always getting any URL with double backslashes for the post image or featured image, for example:

{    
  "URL": "http:\/\/www.example.com\/",
  "avatar": "http:\/\/2.gravatar.com\/avatar\/01c558aea3b2e2?s=11"
}

I searched for this problem but i couldn’t solve it. Hope anyone faced a problem like this could help.


Viewing all articles
Browse latest Browse all 148

Trending Articles