in RSS FEED. I am doing like this to supress html characters from string
public void setEncodedContent(String encodedContent) {
//this.encodedContent = encodedContent;
String noHTMLString = encodedContent.replaceAll("\\<.*?>","");
this.encodedContent = noHTMLString;
}
But I am receiving characters like
– ’ ”
What is the way to overcome it ?
Regards
This worked for me. Hope will be helpful to readers
public void setEncodedContent(String encodedContent) {
//this.encodedContent = encodedContent;
String noHTMLString = encodedContent.replaceAll("\\<.*?>","");
String yesHTMLString= Html.fromHtml(noHTMLString).toString();
this.encodedContent = yesHTMLString;
}