Skip to content

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.

Edited by Frank Fischer

Merge request reports