better fix for gsub() on non-String values in the table. Fixes cachedump brokenness
git-svn-id: file:///home/svn/framework3/trunk@13944 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
8295bb0a4e
commit
643f2ab242
|
@ -121,11 +121,9 @@ class Table
|
|||
rows.each { |row|
|
||||
next if is_hr(row)
|
||||
str << ( row.map{|x|
|
||||
if x.nil?
|
||||
""
|
||||
else
|
||||
x = x.to_s
|
||||
|
||||
x.gsub(/[\r\n]/, ' ').gsub(/\s+/, ' ').gsub('"', '""')
|
||||
end
|
||||
}.map{|x| "\"#{x}\"" }.join(",") + "\n" )
|
||||
}
|
||||
str
|
||||
|
|
Loading…
Reference in New Issue