I'm showing NSString in a UIWebview to show the text with custom smileys (images) but I got into trouble as UIWebview is not able to detect special characters like \n,\r,\t, whitespaces,&,<,> and many more of the string.How to convert a NSString to HTML string to load in a UIWebView ?
There's no built in solution for that. You have to encode the HTML entities. There is an open-source project called NSString-HTML which might suit your needs.
There is also a good NSString category here, which is based on Google's Toolbox.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With