Open iiitomo opened 3 years ago
To address this, I believe we'd need to create a new tokenizer, which is currently not possible due to this issue: https://github.com/splitwise/TokenAutoComplete/issues/412
the default email app of Lineage doesn't have this bug, maybe its code could be used ?
@toppk You can also probably fix this with setTokenizer(new CharacterTokenizer(Arrays.asList(';', ',', ' '), ","));
Edit: or whatever list of characters you want to use to break up tokens
@mgod the issue is that rfc822 allows (and k9 as well) you to type: ken topp <my@email.add>
in the recipients field. There should be <> brackets there, github may not render them
It's much more fun than that. Both the name and the local-part are allowed to contain any of the characters you would normally use to separate recipients when entering them.
Examples:
Name <user@domain.example>
(space)"semi;colon"@domain.example
(semicolon)"LastName, FirstName" <user@domain.example>
(comma)Not that we're currently very good at supporting any of that.
I've been considering building a tokenizer for TokenAutoComplete based on top of https://developer.android.com/reference/android/text/util/Rfc822Tokenizer. I don't know how complete this tokenizer is or how hard this would be to build into the tokenizer structure I'm using in TokenAutoComplete, but it might be worth looking in to if you want something more robust.
k-9 actually sends the addresses from tokenautocomplete to rfc822tokenizer as a sanity check. (see c.f.k.m.Address).
It may be okay for our use case or it may be too strict. I'd imagine us wanting users to be able to cut and paste quoted email address and k9 accepting them. I suppose it's worth investigation.
In To/Cc/Bcc fields, typing an email address followed by a space does NOT behave like typing coma or semicolon after address.
To Reproduce
Expected behavior Typing space after an email address should behave the same way as typing a coma or semicolon.
Environment: