1

I'm developing a WordPress app for iPhone. I get links from feed.

The problem is links in xml is changed if it has '&' character. '&' is replaced by '&'.

For example:

http://localhost/web-wp/?feed=rss2&p=1

I can correct this problem by the simple statement below:

link = [link stringByReplacingOccurrencesOfString:@"&" withString:@"&"];

It run correctly, the result is

http://localhost/web-wp/?feed=rss2&p=1

But I want a intelligent solution same as:

link =[link stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

The above statement run incorrectly.

How can I do?

Thank you!

vietstone
  • 8,344
  • 16
  • 49
  • 73

0 Answers0