melib/email/parser: ack \ as an atom
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 9m31s
Details
Cargo manifest lints / Lint Cargo manifests on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 14m5s
Details
Run Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 15m24s
Details
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 9m31s
Details
Cargo manifest lints / Lint Cargo manifests on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 14m5s
Details
Run Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 15m24s
Details
I think this is not spec compliant but the MIME spec (rfc6068 - The 'mailto' URI Scheme) uses it for "valid" addresses. Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>pull/333/head
parent
f685726eac
commit
933bf157ae
|
@ -368,16 +368,19 @@ mod tests {
|
|||
// Email address: "oh\\no"@example.org; corresponding 'mailto' URI:
|
||||
|
||||
// <mailto:%22oh%5C%5Cno%22@example.org>.
|
||||
assert_eq!(
|
||||
mlt!("mailto:%22not%40me%22@example.org").address,
|
||||
vec![addr!(r#""not@me"@example.org"#)]
|
||||
);
|
||||
|
||||
// Email address: "\\\"it's\ ugly\\\""@example.org; corresponding
|
||||
// 'mailto' URI:
|
||||
|
||||
// <mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org>.
|
||||
// [ref:FIXME]
|
||||
//assert_eq!(
|
||||
// mlt!("mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org").
|
||||
// address, vec![addr!(r#"\"it's ugly\"@example.org"#)]
|
||||
//);
|
||||
assert_eq!(
|
||||
mlt!("mailto:%22%5C%5C%5C%22it's%5C%20ugly%5C%5C%5C%22%22@example.org").address,
|
||||
vec![addr!(r#""\\\"it's\ ugly\\\""@example.org"#)]
|
||||
);
|
||||
|
||||
// When an email address itself includes an "&" (ampersand) character, that
|
||||
// character has to be percent-encoded. For example, the 'mailto' URI
|
||||
|
|
|
@ -1413,7 +1413,7 @@ pub mod generic {
|
|||
if input[0].is_ascii_alphanumeric()
|
||||
|| [
|
||||
b'!', b'#', b'$', b'%', b'&', b'\'', b'*', b'+', b'-', b'/', b'=', b'?', b'^',
|
||||
b'_', b'`', b'{', b'|', b'}', b'~',
|
||||
b'_', b'`', b'{', b'|', b'}', b'~', b'\\',
|
||||
]
|
||||
.contains(&input[0])
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue