0

I have data in the form :

%3Cp%3E%3Cstrong%3Ee-AWB+and+e

I have to decode this and display in a Webview/UILabel!

I have tried this - URL Decoding, but it isn't working for me

Community
  • 1
  • 1
Akshay Yerneni
  • 103
  • 2
  • 11

1 Answers1

0

Use this -

- (NSString *)URLDecode:(NSString *)htmlString
{
    NSString *decodedURL = [htmlString stringByReplacingOccurrencesOfString:@"+" withString:@" "];
    decodedURL = [decodedURL stringByRemovingPercentEncoding];
    return decodedURL;
}

Here you get the output as - <p><strong>e-AWB and e

Dipankar Das
  • 672
  • 5
  • 9