Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace HTMLEntities gem #174

Open
skalee opened this issue Apr 9, 2021 · 2 comments
Open

Replace HTMLEntities gem #174

skalee opened this issue Apr 9, 2021 · 2 comments

Comments

@skalee
Copy link
Contributor

skalee commented Apr 9, 2021

We use https://github.com/threedaymonk/htmlentities gem in some places. Let's replace it.

  • This gem is slow as hell when used improperly (instantiates the same regexp over and over again, and that involves parsing its source)
  • This gem isn't thread-safe
  • This gem is no longer maintained (last release in 2015)
  • This gem fails to recognize entities in some edge cases (bug reported 3ys ago)

Ridiculously, this gem has 80 millions downloads…

@ronaldtse
Copy link
Member

Agree. @skalee what's the alternative (gem)?

@skalee
Copy link
Contributor Author

skalee commented Apr 16, 2021

I don't know any alternative, but official list of entities is available as JSON, so writing a new one should be easy. I'm not yet sure if we really need that though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants