mirror of
https://github.com/transatoshi-mw/grin-explorer.git
synced 2025-10-21 05:23:41 +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
|
||||
if input.chars().all(|x| (x >= 'a' && x <= 'f') || (x >= '0' && x <= '9')) == true {
|
||||
|
||||
|
Reference in New Issue
Block a user