Permalink
Browse files

fix csv formatter

escape all quotes in the string
  • Loading branch information...
1 parent b983fad commit e70617644d9dcd136dfe0a1a9a6585fa4191004b @cutalion committed Aug 14, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 formatters/csv.awk
View
@@ -39,4 +39,4 @@ END {
function ltrim(s) { sub(/^[ \t]+/, "", s); return s }
function rtrim(s) { sub(/[ \t]+$/, "", s); return s }
function trim(s) { return rtrim(ltrim(s)); }
-function escape(s) { sub(/"/, "\"\"", s); return ("\"" s "\"") }
+function escape(s) { gsub(/"/, "\"\"", s); return ("\"" s "\"") }

0 comments on commit e706176

Please sign in to comment.