Problem/Motivation

Imagine a link like this:
Send us an email to <a href="mailto:email@example.com?cc=email2@example.com">email@example.com with CC to email2@example.com</a>.
The text should be in the end
Send us an email to email@example.com with CC to email2@example.com.
But what we see is
Send us an email to with CC to .
And the link won't work at all, it is:
mailto:email[a]example.com?cc=email2email@example.comexample.com?cc=email2%40example.com

There are tests to test against inside "/tests/src/FunctionalJavascript/SpamSpanComplexHrefMailToTest.php"

Steps to reproduce

Write the proposed example in a wysiwyg and check the result.

Proposed resolution

I leave here just the mindset I think it should guide the solution.
This module should just target the emails and obfuscate them. And do this without impacting the text inside the link.
Currently, it replaces the email if it is different from the one in href and it hides if there are two emails.

Comments

dxvargas created an issue. See original summary.

donquixote’s picture

This module should just target the emails and obfuscate them. And do this without impacting the text inside the link.

Perhaps we want more than that.

In a non-js scenario, we want the readable version of the obfuscated mail to tell us all the info that would otherwise be hidden in the mailto href. Or should we not care about this? I have the impression that this was a design goal.

If we don't care about non-js, then perhaps we can simplify a bit, and somehow obfuscate the href as a data attribute with some kind of "encrypted" encoding?

Anybody’s picture

Title: Mail CC is not working » Allow for further mailto: link parameters like subject, cc, ...
Version: 8.x-2.x-dev » 3.x-dev
Category: Bug report » Feature request
Issue tags: +Needs tests

See https://kulturbanause.de/blog/e-mail-links-mailto-mit-betreff-kopie-cc-b... (sorry, German, I didn't find a good alternative in EN yet)

I'll change this into a feature request, but agree it would be super nice to support all parameters allowed by mailto:!

Grevil’s picture

Anybody’s picture

Priority: Normal » Minor

These parameters are not very common, so if anyone needs it, we're happy to review MR's with tests. But the maintainers won't work on this.

Grevil’s picture

Issue summary: View changes

For anyone wanting to implement this, I created tests for this in "/tests/src/FunctionalJavascript/SpamSpanComplexHrefMailToTest.php". Which should should help to implement this! Just remove the "abstract" from the class and the tests are ready to go! :)