From 53795293982156b9c0758f3be98ad09af2963c9a Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 24 Jan 2011 16:46:59 +0000 Subject: [PATCH] Fix escaping of double quotes --- etemplate/inc/class.nextmatch_widget.inc.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/etemplate/inc/class.nextmatch_widget.inc.php b/etemplate/inc/class.nextmatch_widget.inc.php index ebf2a72f31..158b44d9bc 100644 --- a/etemplate/inc/class.nextmatch_widget.inc.php +++ b/etemplate/inc/class.nextmatch_widget.inc.php @@ -1172,13 +1172,9 @@ class nextmatch_widget } $value = implode(', ',$value); - if (strpos($value,'"') !== false) - { - $value = '"'.str_replace('"', '""', $value).'"'; // Escape double quotes - } if (strpos($value,$separator) !== false || strpos($value,"\n") !== false || strpos($value,"\r") !== false) { - $value = '"'.str_replace(array('\\','"'),array('\\\\','\\"'),$value).'"'; + $value = '"'.str_replace(array('\\', '"',),array('\\\\','""'),$value).'"'; $value = str_replace("\r\n", "\n", $value); // to avoid early linebreak by Excel } $out[] = $value;