alexisakers / HTMLString

Escape and unescape HTML entities in Swift
MIT License
170 stars 69 forks source link

removingHTMLEntities doesn't work if text includes non-encoded & character #20

Closed ismaels closed 4 years ago

ismaels commented 5 years ago

I'm using the library to remove HTML entities from Strings on my tvOS project and found out that a string like: Mary & Joe are getting "Married\", due to the & between Mary and Joe words. It returns the String as is without replacing any HTML entities. If I remove that or even encode it as HTML entities, than calling removingHTMLEntities works as expected.

alexisakers commented 5 years ago

I fixed it on master. Can you try again and confirm that it works properly for you?

alexisakers commented 4 years ago

Closing this since there is now a unit test for the case you reported. Feel free to open a new issue if the problem persists.