I have a class with this method, which I borrowed from another answer here on Salesforce Stackexchange:
public String removeHtml(String stringWithHtml) {
String cleanString = '';
if (stringWithHtml != null) {
cleanString = stringWithHtml.replaceAll('<[^>]+>',' ');
}
return cleanString;
}
A little later in the class, I have a method which has this code in it:
String summary = (String)i.get('summary');
summary = removeHtml(summary);
I get this error:
Method does not exist or incorrect signature: removeHtml(String)
But the method does exist, and the signature is correct. Why would I get this error?