Thanks. I'll try that. But I realize I'm going to need to also handle links in the body of the notification (e.g., if a comment or ticket description change includes a link).
On Wednesday, November 25, 2020 at 1:12:48 PM UTC-5 RjOllos wrote: > On Wednesday, November 25, 2020 at 9:44:03 AM UTC-8 Chris Nelson wrote: > >> I'm using SendGrid as my mail relay for Trac 1.0.1 notifications. It >> adds click tracking to URls so the footer of the notification looks a >> mess. I can suppress this by adding "clicktracking=off" before "href" in >> the <a> tab but I can't figure out how to do that. I've >> edited ticket_notify_email.txt to end: >> >> ${_('Ticket URL: <%(link.replace("href", "clicktracking=off href"))s>', >> link=ticket.link} >> >> And a couple of other alternatives but the changes I thought were >> promising seem to be syntax errors which break the template and I don't get >> notified at all. Genshi is not my strong suit so I'm kind of blindly >> trying things that seem like they might work but I could use some >> guidance. Thanks. >> > > Try this: > > ${_('Ticket URL: <%(link)s>', link=ticket.link.replace("href", > "clicktracking=off href")} > > If that doesn't work, then: > > {% with link=ticket.link.replace("href", "clicktracking=off href") %}\ > ${_('Ticket URL: <%(link)s>', link=link} > {% end %}\ > > > Ryan > -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/7f83019d-632e-4cba-93d4-67bd04a60d7fn%40googlegroups.com.