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
This commit is contained in:
abijah
2009-06-17 07:37:45 +00:00
parent 001b156333
commit cd416ea5fa

View File

@@ -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