Anchor element attributes are not preserved, when using the "spamspan_use_form" filter setting

Created on 13 July 2023, about 1 year ago

Problem/Motivation

When using the "spamspan_use_form" filter setting (Use a form instead of a link), no classes, IDs or anything else set in the original anchor tag will be preserved. Not even the "spamspan" class. Instead, the anchor element will be overwritten by the "spamspan_form_pattern".

Steps to reproduce

  • Enable the "spamspan_use_form" setting with the predefined defaults on a filter format of your choice.
  • Create an article using the modified filter and the following anchor tag: <a class="test" id="test-id" href="mailto:example@email.com">Test</a>
  • Save the article and view it.
  • The anchor tag will look like this: <a href="/contact?goto=ZXhhbXBsZUBlbWFpbC5jb20%3D">contact form</a> where the "test" class is missing, as well as the id.

Proposed resolution

Preserve any (allowed) anchor element attributes.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany Grevil

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

Comments & Activities

Production build 0.71.5 2024