bugfix for solution #950 incorrect mailto link

This commit is contained in:
the-djmaze 2023-02-12 01:13:30 +01:00 committed by GitHub
parent 6237a3691b
commit dbabbb9385
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -329,7 +329,7 @@ export class EmailModel extends AbstractModel {
*/
toLine(friendlyView, wrapWithLink) {
let name = this.name,
result = this.email || name,
result = this.email,
toLink = text =>
'<a href="mailto:'
+ encodeHtml(result) + (name ? '?to=' + encodeURIComponent('"' + name + '" <' + result + '>') : '')
@ -348,7 +348,7 @@ export class EmailModel extends AbstractModel {
result = toLink();
}
}
return result;
return result || name;
}
static splitEmailLine(line) {