You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E-mailaddresses are more complex than the regex we are using now. According to the RFC of e-mail there are way more options that commonly used by people.
While that is true I don't think it is the responsibility of the token parser. I you really have to link an e-mail adress which uses many special signs - and I think that is a rare use-case - you can make an explicit anonymous link.
Docutils uses this regex to detect e-mailaddresses: [-_!~*'{|}\/#?^`&=+$%a-zA-Z0-9\x00]+(?:\.[-_!~*'{|}\/#?^`&=+$%a-zA-Z0-9\x00]+)*(?<!\x00)@[-_!~*'{|}\/#?^`&=+$%a-zA-Z0-9\x00]+(?:\.[-_!~*'{|}\/#?^`&=+$%a-zA-Z0-9\x00]s*)*(?:[_~*\/=+a-zA-Z0-9]|[-_.!~*'()[\];\/:@&=+$,%a-zA-Z0-9\x00](?=[>]))
The issue is that we have a text with other special signs in it and want to detect email adresses in it. When we allow certain special signs (yours allows the backtick for example) then these are made part of an email adress that was written in backtics and supposed to be made part of a role.
So I would suggest to only test for common emailadresses (alpha-numeric, a few common special signs) and accept that not every email adress with the most crazy sign combination is auto-detected. Whoever wants to link an emailadress that has such special signs and is not automatically detected will have to use an anonymous link and propper escapes
E-mailaddresses are more complex than the regex we are using now. According to the RFC of e-mail there are way more options that commonly used by people.
Originally posted by @jaapio in #573 (comment)
The text was updated successfully, but these errors were encountered: