问题
I'm developing WordPress Android app which loads post from my Wordpress site using JSON API. In JSON data its found some special characters …, ’, …. when android webview loads post it stops loading at this special characters. It doesn't loads the data after this characters. How to decode or skip/delete these characters in wordpress site or android app.
In one of the post contain ’ after this character post is not visible. It has decoded only & but failed to decode #8217
I'm newbie in wordpress.
JSON link for POST
app post screenshot
回答1:
You can decode the output with the function html_entity_decode
$input = "Hello friends I’m sharing my experience...."
echo html_entity_decode($input);
outputs to: Hello friends I’m sharing my experience....
来源:https://stackoverflow.com/questions/61563349/how-to-decode-strange-html-entities-like-8217-in-wordpress