web: ignore whitespace in searched fingerprints
This commit is contained in:
parent
d79f5c3ef2
commit
ab3f4006dd
|
@ -67,9 +67,10 @@ impl FromStr for Query {
|
|||
return Err(failure::err_msg(
|
||||
"Search by Short Key ID is not supported, sorry!"));
|
||||
}
|
||||
if let Ok(fp) = Fingerprint::from_str(term) {
|
||||
let term_nospace = term.replace(" ", "");
|
||||
if let Ok(fp) = Fingerprint::from_str(&term_nospace) {
|
||||
Ok(ByFingerprint(fp))
|
||||
} else if let Ok(keyid) = KeyID::from_str(term) {
|
||||
} else if let Ok(keyid) = KeyID::from_str(&term_nospace) {
|
||||
Ok(ByKeyID(keyid))
|
||||
} else if let Ok(email) = Email::from_str(term) {
|
||||
Ok(ByEmail(email))
|
||||
|
|
Loading…
Reference in New Issue