Extra attributes of the a tag are rendered in the obfuscated format

Created on 5 July 2023, over 1 year ago
Updated 20 July 2023, over 1 year ago

Problem/Motivation

The extra attributes of the a tag like class="" are put into <span class="e"></span> and it is being rendered on the front end in the obfuscated format before it is normalised back by JS.

Since the goal of the module is to provide obfuscation in a readable format which is readable by screen readers for disabled users, it would be useful to simply hide that markup from the obfuscated text.

Steps to reproduce

Add this to a WYSIWYG field which has the spamspan filter enabled:
<a data-link-style="standalone" href="mailto:test@noreply.com">Test email address</a>
Then load the page without JavaScript enabled and you will see the data-link-style="standalone" printed on the page.

Proposed resolution

I propose a patch which adds a generic css to ensure span.e elements have display: none; to hide them from the end user, yet the JS will be able to turn it back into the proper markup.

🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇧🇪Belgium joevagyok

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

Comments & Activities

Production build 0.71.5 2024