diff --git a/src/construct/autolink.rs b/src/construct/autolink.rs index 8a2f90c..3d72f27 100644 --- a/src/construct/autolink.rs +++ b/src/construct/autolink.rs @@ -162,6 +162,7 @@ pub fn open(tokenizer: &mut Tokenizer) -> State { tokenizer.consume(); State::Next(StateName::AutolinkSchemeOrEmailAtext) } + Some(b'@') => State::Nok, _ => State::Retry(StateName::AutolinkEmailAtext), } } diff --git a/tests/autolink.rs b/tests/autolink.rs index e06d9b0..f41c6b1 100644 --- a/tests/autolink.rs +++ b/tests/autolink.rs @@ -251,6 +251,12 @@ fn autolink() -> Result<(), message::Message> { "should not support a dash before a dot in email autolinks" ); + assert_eq!( + to_html("<@example.com>"), + "
<@example.com>
", + "should not support an at sign at the start of email autolinks" + ); + assert_eq!( to_html_with_options( "",