Filter breaks title and link when it contains an email address

Created on 31 May 2023, about 1 year ago
Updated 12 July 2023, 12 months ago

Problem/Motivation

When I add a mailto link with a title and the SpamSpan filter is activated, it breaks the link and its title.
Here is an example:
<a href="mailto:test@test.de" title="Email to test@test.de">Test</a>
When I save this the link on the page is: <a title="Email to <span class=" spamspan"="" href="mailto:testtest@test.detest.de" class="spamspan">Test</a>.
I also added a screenshot:

When I tried out <a href="mailto:test@test.de" title="Email to other@other.de">Test</a> the link was <a title="Email to <span class=" spamspan"="" href="mailto:testother@test.deother.de" class="spamspan">Test</a>.
First I thought that it would simply replace the @ with the title email address but it seems like the parts before and after the @ get connected to each other.

I tested it with Drupal 10 with SpamSpan 3.0.0-beta2 installed.

Steps to reproduce

  • Add the SpamSpan filter to a text format.
  • Create a new basic page or any other content type with a text area.
  • Add a link with an email address in the href and title attributes.
  • Click save.
🐛 Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

🇩🇪Germany lmoeni

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

Comments & Activities

Production build 0.69.0 2024