I am working on an iPad app (iOS 5 ARC) that will show threads data from server using php based webservices.
After getting JSON dictionary data from server, I am using UIWebView to show data but it is showing raw HTML tags.
Please suggest how to fix it.
Code I’m using:
[cell.webVwPostedContent loadHTMLString:[dic objectForKey:kpost_shortDesc] baseURL:nil];
Below is an html data string I am getting from server and showing in web view:
<u><em><strong>http:\/\/www.msn.com\/<\/strong><\/em><\/u><br \/>\r\n
By clicking "OK", you agree to the Microsoft Service Agreement
and Privacy Statement. You'll get future updates to Bing Bar and other
Microsoft products from Microsoft Update. This software may also download
and install some updates automatically.
The problem here is with your string i.e.
It should be like this
The character
\/is not any escape sequence. For/you don’t need any escape sequence. Just put/in your response string.I suggest to change the response generated by your server.
I tried
it works for me