I have a customer that receives email from an insurance company with an html "button" they need to push to access documents. In the raw email, the link comes through like this:
<a style=3D'text-decoration:none; color:#cc6600; font-weight:bold;' href=3D'https://blah.blah.com/bunchofstuff/Authentication=3Fmod=3Dc&code=12345'/>Access the Document Center</a>
(obviously I changed the link for security)
I understand that the forward slash at the end of the opening <a> element is incorrect, and Roundcube ends up producing html that looks like this:
<a style="text-decoration: none; color: #cc6600; font-weight: bold;" href="https://blah.blah.com/bunchofstuff/Authentication?mod=c&code=12345" target="_blank"></a>Access the Document Center
This ends up rendering the link unusable of course. I have verified this by removing the trailing forward slash in the email stored on the server, and it then renders just fine.
The external mail clients I have tried (Outlook, Thunderbird, etc) are apparently more forgiving than Roundcube and render this in a manner that still allows the link the work.
Is there anything that can be done in Roundcube to get this to render properly? I understand the sender should probably fix their end, but we all know how often that happens...
There's no such option in Roundcube. To fix this you'll need to fix HTML content before it's parsed by washtml class. You can do this in rcmail_wash_html() function in program/steps/mail/func.inc. There you will find some similiar hacks.