Convert email domains to punycode

This commit is contained in:
Daniel García
2020-01-30 22:11:53 +01:00
parent 2798f623d4
commit def174a517
4 changed files with 1150 additions and 1146 deletions

View File

@@ -271,7 +271,7 @@ impl EmailTokenData {
/// Takes an email address and obscures it by replacing it with asterisks except two characters.
pub fn obscure_email(email: &str) -> String {
let split: Vec<&str> = email.split('@').collect();
let split: Vec<&str> = email.rsplitn(2, '@').collect();
let mut name = split[0].to_string();
let domain = &split[1];