decorator and anchor tags

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
daxiang28
Forum Newbie
Posts: 2
Joined: Fri Apr 17, 2009 4:41 pm

decorator and anchor tags

Post by daxiang28 »

Hi,
I am having problems with the decorator recognizing keys in anchor tags:

Code: Select all

<a href="http://site.com/{DECORATEKEY}/">link</a>
The decorator however works fine if i pull the link out of the anchor tag:

Code: Select all

http://site.com/{DECORATEKEY}/
Any thoughts?

Php 5
Swift 4.03
Using batchSend()

Steve
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: decorator and anchor tags

Post by Chris Corbyn »

Hi,

Did you post on the mailing list too? If you did, I replied to that email.

Basically Swift Mailer doesn't have any knowledge of HTML and just does blind str_replace() calls, so there's no real reason it shouldn't work.

Things that would break it are URL encoding or HTML escaping the {REPLACEMENT} text, since the str_replace() will then fail.

Cheers,

Chris
daxiang28
Forum Newbie
Posts: 2
Joined: Fri Apr 17, 2009 4:41 pm

Re: decorator and anchor tags

Post by daxiang28 »

Hi Chris,

Thanks for replying. I did find that I was using Sidecar's Emogrifier to convert html emails to text. It was url encoding somewhere (I'm assuming the DOMDocument.

Thanks,
Steve
Post Reply