fixed backslashes not being stripped for special characters in double quotes
This commit is contained in:
@@ -909,9 +909,16 @@ pub fn unescape_str(raw: &str) -> String {
|
||||
while let Some(q_ch) = chars.next() {
|
||||
match q_ch {
|
||||
'\\' => {
|
||||
result.push(q_ch);
|
||||
if let Some(next_ch) = chars.next() {
|
||||
result.push(next_ch)
|
||||
match next_ch {
|
||||
'"' | '\\' | '`' | '$' => {
|
||||
// discard the backslash
|
||||
}
|
||||
_ => {
|
||||
result.push(q_ch);
|
||||
}
|
||||
}
|
||||
result.push(next_ch);
|
||||
}
|
||||
}
|
||||
'$' => {
|
||||
|
||||
Reference in New Issue
Block a user