Skip to content
Commit 45494842 authored by Frank Fischer's avatar Frank Fischer
Browse files

Fix handling of non-letter characters in names in snippets

The old implementations of getFirstNameFromEmail and getLastNameFromEmail did not
handle non-letter characters in names correctly, e.g. in names like

  "Müller-Schultze, Hans-Jürgen" <hj@mail.xx>

or

  "Hans-Jürgen Müller-Schultze" <hj@mail.xx>

The old implementation returned "Schultze" in the first case and "Müller" in the second.

The new implementation handles those cases correctly using
KEmailAddress::extractEmailAddressAndName. However, the new implementation does not allow
quotation of the display name with single quotes '...'. This is different from the old
version but is actually correct: a single quote is a valid character in the name itself
according to RFC 5322.
parent 3bfb7333
Pipeline #401584 passed with stage
in 11 minutes and 26 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment