I saw this code https://gist.github.com/takuma104/ntlniph/blob/master/gtm/Foundation/GTMNSString+HTML.h
but it doesn’t work on ARC enabled projects or at least without additional porting.
What do you suggest I should do if I want to replace HTML entities with their corresponding symbols?
Parsing as XML is not an option since the HTML may not be a valid XML.
I was thinking to have some regular expression which matches entities and to have a block handling each match and replacing it with the character.
Also is there a built in structure of the mapping between entity codes and values?
You can still use code that doesn’t support ARC in ARC projects. You can disable ARC for specific files in the ‘Compile Sources’ section in your project’s ‘Build Phases’. Select the files you’d like to disable ARC for and press Enter. Then enter the string “-fno-objc-arc” in the text box that appears.