Граф коммитов

15 Коммитов

Автор SHA1 Сообщение Дата
k0kubun e1b4327545 cgi/util.rb: Don't escape tilde in #escape
to make it compatible with ERB::Util.url_encode.

ext/cgi/escape/escape.c: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-05-17 12:34:59 +00:00
shyouhei 20c72dc89d ruby tool/update-deps --fix
Onigumo 6 (r57045) introduced new onigumo.h header file, which is
required from quite much everywhere.  This commit adds necessary
dependencies.

Note: ruby/oniguruma.h now includes onigumo.h,
      ruby/io.h includes oniguruma.h,
      ruby/encoding.h also includes oniguruma.h,
      and internal.h includes encoding.h.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-03-22 06:00:18 +00:00
nobu c373866444 escape.c: check argument
* ext/cgi/escape/escape.c (optimized_unescape): check
  accept_charset encoding argument.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02 08:02:36 +00:00
nobu 64fea27496 Update dependencies
* common.mk (compile.o, loadpath.o): update dependencies.

* common.mk (vm_call.o): remove stale object dependencies.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55589 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-06 05:48:13 +00:00
nobu 2282541898 Magic numbers
* ext/cgi/escape/escape.c (optimized_unescape_html): remove magic
  numbers for literal lengths.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 05:45:35 +00:00
nobu 7175ee79ee Initialize ID
* ext/cgi/escape/escape.c (accept_charset): initialize the static
  ID for theha class variable once at first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-30 04:16:43 +00:00
nobu 20cd25c86f cgi/util.rb: remove CGI::Util#_unescape
* ext/cgi/escape/escape.c (cgiesc_unescape): define unescape
  method instead of _unescape, and should pass the optional
  argument to the super method.
* lib/cgi/util.rb (CGI::Util#_unescape): remove intermediate
  method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-20 08:33:33 +00:00
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