- Issue created by @thomas.frobieter
- 🇩🇪Germany Anybody Porta Westfalica
I think we need details here first and find out what exactly breaks and why. Might also have local reasons. If not, we should first add tests for what should NOT break.
- Status changed to Postponed: needs info
over 1 year ago 7:35am 14 July 2023 - 🇩🇪Germany Anybody Porta Westfalica
As there are errors in the console, I think the output is what happens because of 🐛 Extra attributes of the a tag are rendered in the obfuscated format Fixed if JS isn't executed.
- Assigned to Anybody
- Status changed to Needs work
over 1 year ago 7:38am 14 July 2023 - 🇩🇪Germany Anybody Porta Westfalica
Downgrading to beta2 fixes the issue.
composer require drupal/spamspan:3.0.0-beta2
for anyone running into this issue. - Status changed to Postponed: needs info
over 1 year ago 8:13am 14 July 2023 - 🇩🇪Germany Anybody Porta Westfalica
Can not be reproduced, it's clearly a JS error, but I think must be from another module or theme... then resulting in 🐛 Extra attributes of the a tag are rendered in the obfuscated format Fixed
- Status changed to Active
over 1 year ago 10:11am 14 July 2023 - 🇩🇪Germany Grevil
I could finally replicate the issue! It is actually quite simple to replicate, too...
If the anchor tag has a child Element containing NO text, the markup just goes wild. There are also different results based on the child element.
E.g. when having an icon element as a child, which does NOT have text:
<a class="test-anchor" href="mailto:info@webks.de"> <i class="test1"></i> </a>
The markup will look like this:
- 🇩🇪Germany Grevil
Note, that this is different from 🐛 Extra attributes of the a tag are rendered in the obfuscated format Fixed .
- last update
over 1 year ago 22 pass, 2 fail - @grevil opened merge request.
- 🇩🇪Germany Grevil
Created a test, showing the problem. It is already broken before even being decoded by the javascript (problem on php side).
- 🇩🇪Germany Grevil
This is issue got introduced through changes done in 🐛 Using saveHTML() breaks other links Fixed . We should revert these changes here and try to additionally find a different fix for 🐛 Using saveHTML() breaks other links Fixed here.
- Assigned to Grevil
- last update
over 1 year ago 23 pass, 2 fail - last update
over 1 year ago 23 pass, 2 fail - 🇩🇪Germany Grevil
Alright, this should do it for now, but even if the text was altered, "saveHTML" shouldn't do any escaping mentioned in 🐛 Using saveHTML() breaks other links Fixed
<a href="[media/file/1]">[media/file/1]</a>
- 🇧🇪Belgium joevagyok
Changes are looking good, would have done the same, however it fails for a really weird reason.
- Issue was unassigned.
- Assigned to joevagyok
- last update
over 1 year ago 24 pass, 1 fail - Assigned to Grevil
- 🇩🇪Germany Anybody Porta Westfalica
@joevagyok the key idea is to only touch markup where it's really needed to safe us from things like double escaping where ever possible and for best performance. But yes, maybe needs to be done differently. To me the existing code looks like anything is run thought DOMDocument and we should try to not do that.
- Assigned to joevagyok
- last update
over 1 year ago 33 pass - last update
over 1 year ago 33 pass - Assigned to Grevil
- Status changed to Needs work
over 1 year ago 1:24pm 14 July 2023 - 🇩🇪Germany Grevil
LGTM! I'll finish this issue adding two tests, to make sure, we do not escape any special characters outside / inside the anchor tags.
- last update
over 1 year ago 35 pass - Issue was unassigned.
- Status changed to Needs review
over 1 year ago 1:39pm 14 July 2023 - Status changed to RTBC
over 1 year ago 1:41pm 14 July 2023 - 🇩🇪Germany Grevil
Perfect! Let's wait for the tests to go green and then push!
- Status changed to Fixed
over 1 year ago 1:45pm 14 July 2023 - 🇩🇪Germany Anybody Porta Westfalica
Great work guys, thank you. Please tag a new release, if it's well tested! :)
Hope we won't have a bad weekend though ;D - 🇦🇺Australia fenstrat Australia
- 🇩🇪Germany Anybody Porta Westfalica
@fenstrat thank you! As others are running into the issue, I'll tag 3.1.2 now! :)
Automatically closed - issue fixed for 2 weeks with no activity.