[前][次][番号順一覧][スレッド一覧]

ruby-changes:41749

From: nobu <ko1@a...>
Date: Sun, 14 Feb 2016 17:52:19 +0900 (JST)
Subject: [ruby-changes:41749] nobu:r53823 (trunk): test_cgi_util.rb: test_cgi_unescapeHTML_invalid

nobu	2016-02-14 17:52:38 +0900 (Sun, 14 Feb 2016)

  New Revision: 53823

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53823

  Log:
    test_cgi_util.rb: test_cgi_unescapeHTML_invalid
    
    * test/cgi/test_cgi_util.rb (test_cgi_unescapeHTML_invalid): test
      for invalid escaped HTML, borrowed from rubyspec.

  Modified files:
    trunk/test/cgi/test_cgi_util.rb
Index: test/cgi/test_cgi_util.rb
===================================================================
--- test/cgi/test_cgi_util.rb	(revision 53822)
+++ test/cgi/test_cgi_util.rb	(revision 53823)
@@ -98,6 +98,10 @@ class CGIUtilTest < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/cgi/test_cgi_util.rb#L98
     assert_equal("'&\"><", CGI::unescapeHTML("&#39;&amp;&quot;&gt;&lt;"))
   end
 
+  def test_cgi_unescapeHTML_invalid
+    assert_equal('&<&amp>&quot&abcdefghijklmn', CGI::unescapeHTML('&&lt;&amp&gt;&quot&abcdefghijklmn'))
+  end
+
   Encoding.list.each do |enc|
     begin
       escaped = "&#39;&amp;&quot;&gt;&lt;".encode(enc)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]