google/google-toolbox-for-mac

gtm_stringByUnescapingFromHTML does not unescape 👍

salagadoola opened this issue ยท 3 comments

I was trying to unescape 👍 (which is ๐Ÿ‘), but found that gtm_stringByUnescapingFromHTML could only unescape number sequence below 65535 (USHRT_MAX).

Is is possible to support unescaping HTML entities above 65535 and make XCTAssertEqualObjects([@"👍" gtm_stringByUnescapingFromHTML], @"๐Ÿ‘", @"HTML unescaping failed"); pass?

Edit:
I am thinking of solving this issue with salagadoola@c28a73b which is derived from stackoverflow https://stackoverflow.com/questions/6458708/converting-an-nsstring-to-and-from-utf32#answer-6458988

That looks fine, feel free to send in a Pull Request if you'd like to update the library.

Thanks. I created a pull request for this issue. #156

Fixed by #156