I am analyzing an XML file using NSXMLParser, which works great but sometimes gives me inaccurate results.
For example, I get this URL:
http://www.thehungersite.com/clickToGive/home.faces;jsessionid=01F974DC9E276DA587AE299175EDF4F4.ctgProd02?siteId=4&link=ctg_trs_home_from_ths_home_sitenav
but NSXMLParser outputs:
http://www.thehungersite.com/clickToGive/home.faces;jsessionid=01F974DC9E276DA587AE299175EDF4F4.ctgProd02?siteId=4&link=ctg_trs_home_from_ths_home_sitenav
For some reason, it ignored the #38; part of the string – how can I get this back? Assuming this was HTML encoding I have tried stringByAddingPercentEscapesUsingEncoding: but that will not work.
Any ideas?
Perhaps the top answer to this question might help:
Objective-C: How to replace HTML entities?
It’s basically a category to NSString someone made that offers both encoding and decoding of HTML entities in NSString.