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
Comment #2
donquixote CreditAttribution: donquixote commentedPerhaps 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?
Comment #3
AnybodySee 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:
!Comment #4
Grevil CreditAttribution: Grevil as a volunteer and at DROWL.de commentedComment #5
AnybodyThese 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.
Comment #6
Grevil CreditAttribution: Grevil as a volunteer and at DROWL.de commentedFor 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! :)