This commit is contained in:
Ali MJ Al-Nasrawy 2021-06-03 15:45:14 +03:00
parent 34b58f415a
commit 56bba32029
1 changed files with 1 additions and 5 deletions

View File

@ -170,11 +170,7 @@ impl Quoter {
idx += 1;
}
cloned.map(|data| {
// SAFETY: we get data from http::Uri, which does UTF-8 checks already
// this code only decodes valid pct encoded values
unsafe { String::from_utf8_unchecked(data) }
})
cloned.map(|data| String::from_utf8_lossy(&data).into_owned())
}
}