0

I received some html string contains special entities, like https://www.toptal.com/designers/htmlarrows/symbols/ballot-box/

I want to convert to ☐ or HEX CODE ☐

So, do a similar job like https://mothereff.in/html-entities

new2cpp
  • 3,311
  • 5
  • 28
  • 39
  • This is allready answered https://stackoverflow.com/a/1600584/1900722 – anquegi Dec 01 '20 at 07:07
  • @anquegi yes, I saw it before I posted.Frame number: 0/16 [1] pry(main)> require 'cgi' => false [2] pry(main)> CGI.escapeHTML('☐') => "☐" [3] pry(main)> CGI.unescapeHTML('☐') => "☐" – new2cpp Dec 01 '20 at 20:01

0 Answers0