1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

8 commits

Author SHA1 Message Date
nobu
d463c492bc cgi/escape: Optimize CGI.unescape
* cgi/escape/escape.c: Optimize CGI.unescape performance by C ext
  for ASCII-compatible encodings.  [Fix GH-1250]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53885 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-21 04:57:57 +00:00
nobu
1b7109e11a cgi/escape: Optimize CGI.unescapeHTML
* cgi/escape/escape.c: Optimize CGI.unescapeHTML performance by C
  ext for ASCII-compatible encodings.  [Fix GH-1242]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53884 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-21 04:57:35 +00:00
nobu
a320f811cf mask upper nibble
* ext/cgi/escape/escape.c (optimized_escape): move c and use it
  instead of cstr[i].  mask upper nibble for the platforms where
  CHAR_BIT > 8.  [Fix GH-1238]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-04 05:10:36 +00:00
nobu
7d1dd7cad8 initialize dest to 0
* ext/cgi/escape/escape.c (optimized_escape_html): initialize dest
  to 0 and tell the result to be modified, instead of a separate
  flag.

* ext/cgi/escape/escape.c (optimized_escape): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53732 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-04 03:40:41 +00:00
nobu
217ad664ab cgi/escape: Optimize CGI.escape
* cgi/escape/escape.c: Optimize CGI.escape performance by C ext
  for ASCII-compatible encodings.  [Fix GH-1238]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53731 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-04 03:39:12 +00:00
nobu
10a129cee7 escape.c: should not freeze
* ext/cgi/escape/escape.c (optimized_escape_html): CGI.escapeHTML
  should return unfrozen new string.
  [ruby-core:72426] [Bug #11858]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-22 05:31:31 +00:00
nobu
1b107d48ef escape.c: Preserve original state
* ext/cgi/escape/escape.c (preserve_original_state): Preserve
  original state for tainted and frozen.  [Fix GH-1166]
  [ruby-dev:49451] [Bug #11855]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-21 20:40:02 +00:00
nobu
ce7f7f5e3d cgi/escape: Optimize CGI.escapeHTML
* cgi/escape/escape.c: Optimize CGI.escapeHTML for
  ASCII-compatible encodings.  [Fix GH-1164]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-20 11:54:54 +00:00