From cd416ea5faf361b3f9d85a36f8e0547e9faa181b Mon Sep 17 00:00:00 2001 From: abijah Date: Wed, 17 Jun 2009 07:37:45 +0000 Subject: [PATCH] Fixed bug converting PHP strings to javascript when they contain the single quote (') character git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605@156 97e9348a-65ac-dc4b-aefc-98561f571b83 --- site/views/helpers/format.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/views/helpers/format.php b/site/views/helpers/format.php index 005f71a..ffa6046 100644 --- a/site/views/helpers/format.php +++ b/site/views/helpers/format.php @@ -211,7 +211,7 @@ class FormatHelper extends AppHelper { return $prefix . $var; // OK, must just be a string after all - return $prefix . "'$var'"; + return $prefix . "'" . preg_replace("/'/", '\\\'', $var) . "'"; } // The only thing left that we know how to dump