From 246e64657d5c8186e68e71e02ec5e1c145f9d931 Mon Sep 17 00:00:00 2001 From: Joe Hunt Date: Fri, 20 Apr 2007 07:13:07 +0000 Subject: [PATCH] Fixed bug no 1703888 Apostrophes and other unescaped characters --- gl/includes/db/gl_db_accounts.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gl/includes/db/gl_db_accounts.inc b/gl/includes/db/gl_db_accounts.inc index e48823f..3b5daa9 100644 --- a/gl/includes/db/gl_db_accounts.inc +++ b/gl/includes/db/gl_db_accounts.inc @@ -3,6 +3,7 @@ function add_gl_account($account_code, $account_name, $account_type, $account_code2, $tax_code) { + $account_name = db_escape($account_name); $sql = "INSERT INTO ".TB_PREF."chart_master (account_code, account_code2, account_name, account_type, tax_code) VALUES ('$account_code', '$account_code2', '$account_name', $account_type, $tax_code)"; @@ -12,6 +13,7 @@ function add_gl_account($account_code, $account_name, $account_type, $account_co function update_gl_account($account_code, $account_name, $account_type, $account_code2, $tax_code) { + $account_name = db_escape($account_name); $sql = "UPDATE ".TB_PREF."chart_master SET account_name='$account_name', account_type=$account_type, account_code2='$account_code2', tax_code=$tax_code WHERE account_code = $account_code"; -- 2.30.2