alexisakers / HTMLString

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

Infinite loop in -[NSString stringByRemovingHTMLEntities] #31

Closed bdaz closed 4 years ago

bdaz commented 4 years ago

I'm using HTMLStrings 6.0.0. Looks like simply calling -[NSString stringByRemovingHTMLEntities] is causing an infinite loop. See attached.

Screen Shot 2020-09-28 at 12 17 56 PM

Example invocation context:

NSString *const htmlEncodedString = @"Apple's Tim Cook on a "giant leap" in social progress;
NSString *const noEntities = [htmlEncodedString stringByRemovingHTMLEntities]; // Hangs
JCSooHwanCho commented 4 years ago

I made PR about it in #33

alexisakers commented 4 years ago

@bdaz Can you confirm this has been fixed in 6.0.1?

bdaz commented 4 years ago

@alexaubry Can confirm—fixed! Thank you.