Optimize CGI.escapeHTML for ASCII-compatible encodings by k0kubun · Pull Request #1164 · ruby/ruby

As commented in #156 (comment), I rewrote CGI.escapeHTML in C, which is used by ERB::Util#html_escape. Since escaping HTML is expensive in rendering a template, I want it to be faster. For now, I o...