Problem/Motivation
Sometimes we want to add subject and body parameters to an email address, so they get used by the user's mail client to prepopulate the subject and text fields in a newly opened email.
When using the HTML obfuscating method, these parameters get lost.
Steps to reproduce
Use an email of the form foo@example.com?subject=Bar&body=Baz in a text field. Apply the Obfuscate filter. Open the page and you will see only the bare email (foo@example.com).
| Comment | File | Size | Author |
|---|
Issue fork obfuscate-3366415
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
mrshowermanI noticed that the query string is available in the
$extraarray, whose contents are added to the resulting<a>element as HTML attributes. The attached patch fixes the issue by adding the query string to the URL instead and removing it from the array. Also, I noticed a few code inconsistencies introduced by the latest rewrite, which I tried to fix as well.Comment #3
mrshowermanComment #5
mrshowermanI noticed that in the HTML method, there were a few attributes added to the link that aren't valid HTML, like
type="mailto". On the other hand, other valid attributes got lost in thepreandpostkeys that were not processed properly.Created an MR that fixes both on top of the original patch.