correctly unquote identifiers
This commit is contained in:
@@ -18,6 +18,7 @@ $Source$
|
||||
- added PMA_unQuote() to remove quotes from strings
|
||||
* libraries/footer.inc.php: correctly escape strings inside JavaScript
|
||||
(part of bug #1532721)
|
||||
* libraries/sqlparser.lib.php: correctly unquote identifiers
|
||||
|
||||
2006-08-01 Marc Delisle <lem9@users.sourceforge.net>
|
||||
* Documentation.html: patch #1532493 + light editing from me,
|
||||
|
@@ -1022,16 +1022,10 @@ if ( ! defined( 'PMA_MINIMUM_COMMON' ) ) {
|
||||
$identifier = $arr[$i]['data'];
|
||||
break;
|
||||
|
||||
//TODO: check embedded double quotes or backticks?
|
||||
// and/or remove just the first and last character?
|
||||
case 'quote_backtick':
|
||||
$identifier = str_replace('`', '', $arr[$i]['data']);
|
||||
break;
|
||||
case 'quote_double':
|
||||
$identifier = str_replace('"', '', $arr[$i]['data']);
|
||||
break;
|
||||
case 'quote_single':
|
||||
$identifier = str_replace("'", "", $arr[$i]['data']);
|
||||
$identifier = PMA_unQuote($arr[$i]['data']);
|
||||
break;
|
||||
} // end switch
|
||||
|
||||
@@ -1732,7 +1726,7 @@ if ( ! defined( 'PMA_MINIMUM_COMMON' ) ) {
|
||||
|
||||
if ($arr[$i]['type'] == 'quote_backtick') {
|
||||
// remove backquotes
|
||||
$identifier = str_replace('`', '', $arr[$i]['data']);
|
||||
$identifier = PMA_unQuote($arr[$i]['data']);
|
||||
} else {
|
||||
$identifier = $arr[$i]['data'];
|
||||
}
|
||||
|
Reference in New Issue
Block a user