CommandStringHelper: fixed backslashes not being removed from escaped quotes

this time, without breaking eval commands ... stripslashes likes to strip ALL backslashes, whether they are actually escaping something or not, which is super annoying.
This commit is contained in:
Dylan K. Taylor 2022-05-10 15:09:57 +01:00
parent 6da53536ca
commit d2e421c424
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -49,7 +49,7 @@ final class CommandStringHelper{
foreach($matches[0] as $k => $_){
for($i = 1; $i <= 2; ++$i){
if($matches[$i][$k] !== ""){
$args[(int) $k] = $i === 1 ? stripslashes($matches[$i][$k]) : $matches[$i][$k];
$args[(int) $k] = preg_replace('/\\\\([\\\\"])/u', '$1', $matches[$i][$k]);
break;
}
}