Skip to content

Commit

Permalink
Make sure Field#escaped_value also works when @value is an Array on 1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
manveru committed Jun 7, 2009
1 parent 9134b09 commit 48a4ec9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/webrat/core/elements/field.rb
Expand Up @@ -134,7 +134,7 @@ def name
end

def escaped_value
CGI.escape(@value.to_s)
CGI.escape([*@value].first.to_s)
end

def labels
Expand Down

1 comment on commit 48a4ec9

@rjspotter
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaks tests that set @value with a string that has a newline

Please sign in to comment.