mirror of
https://github.com/transatoshi-mw/grin-explorer.git
synced 2025-10-21 21:43:40 +00:00
trim and lowercase search input
This commit is contained in:
@@ -171,6 +171,9 @@ pub async fn search(input: Option<&str>) -> Either<Template, Redirect> {
|
|||||||
})),
|
})),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Trim and lowercase the input
|
||||||
|
let input = input.trim().to_lowercase();
|
||||||
|
|
||||||
// Check for valid chars
|
// Check for valid chars
|
||||||
if input.chars().all(|x| (x >= 'a' && x <= 'f') || (x >= '0' && x <= '9')) == true {
|
if input.chars().all(|x| (x >= 'a' && x <= 'f') || (x >= '0' && x <= '9')) == true {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user