Query string gets lost in HTML method

Created on 13 June 2023, over 1 year ago

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).

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇩🇪Germany mrshowerman Munich

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mrshowerman
  • 🇩🇪Germany mrshowerman Munich

    I noticed that the query string is available in the $extra array, 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.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
Production build 0.71.5 2024