views:

259

answers:

2

Hi, I am developing an application for iphone which needs to load some description to a UIWebView. But text that loads into the UIWebView shows some html tags like <p></p>.Is there any way to remove these type of tags?

Thanks in advance

A: 

This is the best answer and is exactly what you are looking for ...

Write the following script in the webView delegate method. ( UIWebviewdidfinishLoading)

NSString *myText = [webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.textContent"];

Biranchi
A: 

I asked a similar question the other day and got some good responses. I imagine one of these could suit your needs.

http://stackoverflow.com/questions/3216798/anyway-to-delete-all-a-href-tags-with-javascript-after-the-page-loads-on-an-ip/3220041#3220041

Hope it is helpful!

Matthew