Actions
Feature #255
closedCGI element generation methods should convert keys/values to Strings before escaping.
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
Updated by NoKarma (Arthur Schreiber) over 16 years ago
=begin
Just wanted to say that this report and the patch are by me.
=end
Updated by NoKarma (Arthur Schreiber) over 16 years ago
- File new_cgi_elements.patch new_cgi_elements.patch added
=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
Updated by naruse (Yui NARUSE) over 16 years ago
- Assignee set to xibbar (Takeyuki FUJIOKA)
=begin
=end
Updated by yugui (Yuki Sonoda) about 16 years ago
- Target version set to 1.9.1 Release Candidate
=begin
=end
Updated by xibbar (Takeyuki FUJIOKA) about 16 years ago
- Status changed from Open to Closed
=begin
=end
Actions
Like0
Like0Like0Like0Like0Like0