Added character limits

pull/6/head
Mark 2023-09-21 12:35:59 -07:00
parent c8ebec59ae
commit 9f9cc5d084
Signed by: Mark
GPG Key ID: AD62BB059C2AAEE4
1 changed files with 9 additions and 1 deletions

View File

@ -98,7 +98,15 @@ pub fn main() -> Result<(), std::io::Error> {
break;
},
_ => { pb.add_char(*q); }
// Only process sane characters
'a'..='z' | 'A'..='Z' | '0'..='9'
|'!'|'@'|'#'|'$'|'%'|'^'|'&'|'*'|'('|')'
|'?'|'~'|','|'.'|'['|']'
|'<'|'>'|'/'|'_'|'-'|':'|'|'|'='|'+'|';'
=> { pb.add_char(*q); },
_ => {}
};
} else {
match c.unwrap() {