I am using stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding
to pass data to a php script. The problem is if the field has the char '&' in the text lets say: 'someone & cars', only the text "someone" is saved, everything after the '&' doesn't.
To create the string I use [NSString stringWithFormat:]
, so I have like 5 field in the form and if I use stringbyReplacingOcorrencesOfstring:@"&"
, what it does is replace the whole string not only the char '&' from the text field, so I get error.
Any ideas?