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

30 Коммитов

Автор SHA1 Сообщение Дата
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 8e46f401b2 ASCII-incompatible escape
* lib/cgi/util.rb (escapeHTML, unescapeHTML): consider
  ASCII-incompatible encodings.  [Fix GH-1239]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-06 13:31:07 +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
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
nobu af1da410ca cgi/util.rb: use alias
* lib/cgi/util.rb (escape_html, unescape_html): make synonyms
  aliases instead of wrapper methods.
* lib/cgi/util.rb (escape_element, unescape_element): ditto.
  [Fixes GH-573]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-21 21:46:17 +00:00
xibbar fd2fc885b4 * lib/cgi/util.rb (CGI::Util#escape, unescape): Unuse regexp special
global variable. [Feature #8648] Thanks to fotos.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16 23:52:47 +00:00
xibbar 69ea68cc21 * lib/cgi/util.rb (CGI.escapeHTML): performance improvement.
thank you nagachika-san.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 21:11:52 +00:00
xibbar e26fe81b0b * lib/cgi/util.rb(CGI.escapeHTML): performance improvement.
thank you @bbxiao1 via
  https://github.com/ruby/ruby/pull/333

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 12:42:05 +00:00
zzak 012dc9d099 * lib/cgi/util.rb, lib/erb.rb: Use String#b [Feature #8394] by znz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-02 06:06:00 +00:00
xibbar 612143ddc1 * lib/cgi/util.rb: Constant parameter is faster and economy than
string parameter.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-16 10:26:57 +00:00
xibbar 2829cbacc3 * lib/cgi/util.rb: Use String#b instead of dup.force_encoding("ASCII-8BIT")
[Feature #8394]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-16 10:01:07 +00:00
xibbar b35529bb4e * lib/cgi/util.rb: class methods modulize for using like a function.
[Feature #8354]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40571 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-03 11:23:23 +00:00
xibbar 5865e7604c * lib/cgi/util.rb (CGI::unescapeHTML): fix Hexadecimal numeric character.
[Bug #8183]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08 04:06:39 +00:00
naruse bbb6b5e84e * lib/cgi/util.rb (CGI.escapeHTML): use '
[ruby-core:47221] [Bug #6861]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 22:30:47 +00:00
nobu d059d718b5 remove trainling spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 04:50:18 +00:00
xibbar 745ada8649 Tue Aug 14 11:55:37 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/util.rb (CGI::escapeHTML): &apos; is not recommended. [Bug #6850]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-14 03:03:42 +00:00
xibbar c47cca2f85 Wed Jul 18 07:59:29 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/util.rb (CGI.escapeHTML,unescapeHTML): Add &apos; for HTML5 escaping.
    [Feature #6620]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-17 23:04:46 +00:00
xibbar 067b6e8237 Wed Jul 4 13:38:12 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/util.rb: revert 36299: &apos; is XML specification.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36305 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-04 04:42:35 +00:00
xibbar 07132e0675 Wed Jul 4 08:24:28 2012 Takeyuki FUJIOKA <xibbar@ruby-lang.org>
* lib/cgi/util.rb: Add &apos; to CGI's HTML escaping.[Feature #6620]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-03 23:32:33 +00:00
mrkn ce8d368b1e * lib/cgi/util.rb (CGI.escape): support a string with invalid byte
sequence.

* test/cgi/test_cgi_util.rb
  (test_cgi_escape_with_invalid_byte_sequence): test for the above
  change.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-01-20 11:48:52 +00:00
drbrain b8f3f2d62e * lib/cgi/util.rb: Improve documentation. Patch by Kuba Fietkiewicz.
[Ruby 1.9 - Bug #4775]
	* lib/cgi/core.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-01 00:42:06 +00:00
drbrain 34276148c4 * lib/cgi/util.rb: Improve documentation. Patch by Clinton Nixon.
[Ruby 1.9 - Bug #4733]
	* lib/cgi/core.rb:  ditto
	* lib/cgi/cookie.rb:  ditto


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 21:07:13 +00:00
xibbar fc6d58ccc4 * lib/cgi/util.rb (CGI::unescape): bugfix to unescape the multibyte
string. Thanks nobu and tDiary dev members. [Bug #3909]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-10-13 13:39:13 +00:00
xibbar 2b222b9b17 * lib/cgi/{core, util}.rb (RFC822_DAYS, RFC822_MONTHS):
move the constant because used only util.rb. [Bug #2704]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-20 03:39:34 +00:00
xibbar 5de99652bd * lib/cgi/util.rb (CGI::pretty): fix the overflow bug
if stripped string.[ruby-dev:37975]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25738 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-12 15:48:46 +00:00
xibbar 0e260ef122 * lib/cgi/cookie.rb: add default value to @@accept_charset
if have not defined. [ruby-dev:38987]
* lib/cgi/util.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-10-04 13:25:49 +00:00
xibbar 1976ef38a7 * lib/cgi/util.rb (CGI::unescape): support encoding option.
* lib/cgi/cookie.rb (CGI::Cookie.parse): fix for the encoded value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24314 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-07-30 05:34:02 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
xibbar 0bbda39758 * lib/cgi*: split cgi.rb into four files. [ruby-dev:36041]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19272 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-09 13:09:56 +00:00