How to Decode Strange Html Entities Like &#8217 in Wordpress?

I'm developing WordPress Android app which loads post from my Wordpress site using JSON API. In JSON data its found some special characters &#8230, &#8217, &#8230. 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 &#8217 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 Answer

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....

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Elena Rostova

Elena Rostova

Lead Health, Wellness & Medical Journalist

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.

Share this article
Twitter Facebook Pinterest