Closed barthez closed 4 years ago
Hi! Thank you for reporting this issue. Investigating made me find several other issues. I've pushed a new version, can you try 0.5.1 and verify that it works for you?
Yes! It works! Thank you very much for a quick response š
Hello,
Recently I stumbled upon strange bug while parsing HTML with Floki. It causes
argument error
inHtmlEntities.decode_entity/1
:I believe the issue originates from wrongly encoded emoji (š) that should have been encoded to
💖
instead it was encoded to��
. This comes from HTML body of an email and I'm not sure who to blame for this: sender's email client or GMail (I was fetching messages via Gmail API).In the end, I believe
HtmlEntities.decode_entity/1
should rather return:error
in such case.argument error
is raised from this line: https://github.com/martinsvalin/html_entities/blob/e9d55f1da3f14813fc6fff804453d77c8547dd91/lib/html_entities.ex#L56<<55357::utf8>>
is not valid.It should be easy fix, good candidate for first PR.
Best!