Fix incorrect mailto format #1521

This commit is contained in:
RainLoop 2017-10-06 21:52:00 +03:00
parent 71718db8f0
commit 90a3d2b62a
5 changed files with 42 additions and 9 deletions

View file

@ -112,8 +112,10 @@ class EmailModel
{
if (friendlyView && '' !== this.name)
{
result = wrapWithLink ? '<a href="mailto:' + encodeHtml('"' + this.name + '" <' + this.email + '>') +
result = wrapWithLink ? '<a href="mailto:' + encodeHtml(this.email) + '?to=' + encodeHtml('"' + this.name + '" <' + this.email + '>') +
'" target="_blank" tabindex="-1">' + encodeHtml(this.name) + '</a>' : (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
{
@ -123,11 +125,17 @@ class EmailModel
if (wrapWithLink)
{
result = encodeHtml('"' + this.name + '" <') + '<a href="mailto:' +
encodeHtml('"' + this.name + '" <' + this.email + '>') +
encodeHtml(this.email) + '?to=' + encodeHtml('"' + this.name + '" <' + this.email + '>') +
'" target="_blank" tabindex="-1">' +
encodeHtml(result) +
'</a>' +
encodeHtml('>');
// result = encodeHtml('"' + this.name + '" <') + '<a href="mailto:' +
// encodeHtml('"' + this.name + '" <' + this.email + '>') +
// '" target="_blank" tabindex="-1">' +
// encodeHtml(result) +
// '</a>' +
// encodeHtml('>');
}
else
{