Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to recreate:
Create anything (block, node) using spamspanned input format. Make sure to include this text: <a href="mailto:test@example.org" class="random" id="test">Email test</a>
Now when you watch it rendered with javascript on — all attributes except href
are gone, including id
and class
.
The generated HTML (after filter and JavaScript) looks like this: <a class="spamspan" href="mailto:test@example.org">Email test</a>
Can spamspan preserve these attributes?
Comment | File | Size | Author |
---|---|---|---|
#6 | spamspan-fix_lost_attrs-1012088-6.patch | 5.19 KB | vitalie |
Comments
Comment #1
pawel.traczynski CreditAttribution: pawel.traczynski commentedYes, this is indeed very very annoying. I discovered this today and for some projects it makes this module totally unusable.
So +1 for this.
Comment #2
peterx CreditAttribution: peterx commentedHas anyone worked on the Javascript?
You need some code at the start to extract id, style, etc.
I am using the D7 version and it contains the following code to build the link. You could include id, style, etc using .attr.
Comment #3
peterx CreditAttribution: peterx commentedI am moving this to D7 for possible work. Someone with D6 will have to port the change back to D6 and test.
Comment #4
peterx CreditAttribution: peterx commentedI am finishing work on the project using Spamspan and will not be able to work on this issue. Can anyone else work on it?
Comment #5
vitalie CreditAttribution: vitalie commentedComment #6
vitalie CreditAttribution: vitalie commentedPlease review this patch.
Comment #9
vitalie CreditAttribution: vitalie commented