Bugfix: mail?to= should be encodeURIComponent()

This commit is contained in:
djmaze 2020-09-22 14:17:48 +02:00
parent f559b3c87e
commit d2c9e860cb

View file

@ -365,13 +365,11 @@ class EmailModel {
? '<a href="mailto:' +
encodeHtml(this.email) +
'?to=' +
encodeHtml('"' + this.name + '" <' + this.email + '>') +
encodeURIComponent('"' + this.name + '" <' + this.email + '>') +
'" target="_blank" tabindex="-1">' +
encodeHtml(this.name) +
'</a>'
: useEncodeHtml
? encodeHtml(this.name)
: this.name;
: (useEncodeHtml ? encodeHtml(this.name) : this.name);
// result = wrapWithLink ? '<a href="mailto:' + encodeHtml('"' + this.name + '" <' + this.email + '>') +
// '" target="_blank" tabindex="-1">' + encodeHtml(this.name) + '</a>' : (useEncodeHtml ? encodeHtml(this.name) : this.name);
} else {
@ -383,7 +381,7 @@ class EmailModel {
'<a href="mailto:' +
encodeHtml(this.email) +
'?to=' +
encodeHtml('"' + this.name + '" <' + this.email + '>') +
encodeURIComponent('"' + this.name + '" <' + this.email + '>') +
'" target="_blank" tabindex="-1">' +
encodeHtml(result) +
'</a>' +