IssacZH. IssacZH. - 1 month ago 26
HTML Question

iOS decode HTML entity to string

I have this code &#21488, it is actually a Chinese character with HTML escape using this site.

I wanted to change from the mentioned code back to Chinese character in the program. I tried out NSString + HTML Link 1 and Link 2. With the method name stringByDecodingHTMLEntities.

They both return the same result, which is &#21488. The actual Chinese character is "台". Kindly advise any method that I can use to convert it.

*Note: I am not really sure whether the term "HTML escape" is correct. Correct me if I'm wrong.

Answer

Both link below is working. It is actually my careless mistake for missing out an character.

https://github.com/Koolistov/NSString-HTML

https://github.com/mwaterfall/MWFeedParser/blob/master/Classes/NSString%2BHTML.m

Comments