i have a response coming in from the api in form of a text I want to scan that text for the word "Planned Parenthood health center" and insert a hyperlink on that word which redirects to plannedparenthood.org/health-center portal.
my approach:
NSString *text = response.content;
text = [text stringByReplacingOccurrencesOfString:@"Planned Parenthood health center"
withString:@"<a href=\"http://www.plannedparenthood.org/health-center\">Planned Parenthood health center</a>"];
though the link on the text is getting replaced. It is getting replaced by
<a href=\"http://www.plannedparenthood.org/health-center\">Planned Parenthood health center </a>
What's wrong why am I not getting any links there? am I doing something wrong I have also set the user enabled interaction to YES