I am posting to a NSURL
using the new NSCharacterSet
to allow spaces and different characters which would otherwise cause the app to crash upon posting. I have come across an issue, whenever I have an apostrophe(')
in the text I am posting it causes the app to crash. Code below is what I am using to convert the text box to post it. I have tried most characters and nothing causes it to crash so I don't understand why the apostrophe does. Anyone come across the same issue??
NSString *text = [self.textbox.text stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]];