I’m using a URL from an API where a search term is surrounded by quotation marks. For example:
http://www.example.com/searchterm="search".
However, because of the quotation marks, my NSURL (generated by URLWithString) is nil due to an invalid URL. Is there a way around this? Thanks!
You can place a backslash before the quotation mark, or the URL encoded value
%22:http://www.example.com/searchterm=\"search\"http://www.example.com/searchterm=%22search%22or you can remove the quotations before using it as an NSURL.
Then you can go about your normal NSURL call: