Skip to content

Commit 7f5086c

Browse files
committed
Fix quote doubling decoding
1 parent ada0a6b commit 7f5086c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/SQLParser.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,7 @@ function decode_value($token){
11631163
'"' => '"',
11641164
);
11651165
$out = '';
1166+
$q = $token[0];
11661167
for ($i=1; $i<strlen($token)-1; $i++){
11671168
if ($token[$i] == '\\'){
11681169
if ($map[$token[$i+1]]){
@@ -1171,6 +1172,10 @@ function decode_value($token){
11711172
$out .= $token[$i+1];
11721173
}
11731174
$i++;
1175+
}elseif ($token[$i] == $q && $token[$i+1] == $q){
1176+
# quote doubling
1177+
$out .= $q;
1178+
$i++;
11741179
}else{
11751180
$out .= $token[$i];
11761181
}

0 commit comments

Comments
 (0)