Project

General

Profile

Actions

Feature #255

closed

CGI element generation methods should convert keys/values to Strings before escaping.

Added by Anonymous over 16 years ago. Updated over 13 years ago.


Description

=begin
@cgi.file_field("test", 40)

=> ''

@cgi.file_field("NAME" => "test", "SIZE" => 40)

=> private method `gsub' called for 40:Fixnum

The attached patch fixes this issue for all element generation methods.
Additionally, it allows passing Symbols instead of Strings for attribute names.

@cgi.file_field("NAME" => "test", "SIZE" => 40)

=> ''

@cgi.file_field(:NAME => "test", :SIZE => 40)

=> ''

=end


Files

cgi_elements.patch (604 Bytes) cgi_elements.patch Anonymous, 07/10/2008 10:10 PM
new_cgi_elements.patch (395 Bytes) new_cgi_elements.patch New patch NoKarma (Arthur Schreiber), 07/18/2008 06:33 PM
Actions #1

Updated by NoKarma (Arthur Schreiber) over 16 years ago

=begin
Just wanted to say that this report and the patch are by me.
=end

Actions #2

Updated by NoKarma (Arthur Schreiber) over 16 years ago

=begin
Ok, the old patch is bugged.
Converting keys to Strings using #to_s might result in duplicated element attributes, so this change has been removed.

New patch attached.
=end

Actions #3

Updated by naruse (Yui NARUSE) about 16 years ago

  • Assignee set to xibbar (Takeyuki FUJIOKA)

=begin

=end

Actions #4

Updated by yugui (Yuki Sonoda) about 16 years ago

  • Target version set to 1.9.1 Release Candidate

=begin

=end

Actions #5

Updated by xibbar (Takeyuki FUJIOKA) about 16 years ago

  • Status changed from Open to Closed

=begin

=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0