SOLVED

Re: How do I make anchor links work in an email?

Go to solution
Jimmy_Hang
Level 2

Re: How do I make anchor links work in an email?

Thank you Sanford!

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I make anchor links work in an email?

Yep, definitely confusing behavior. The reserved word still gets flagged even when double-escaped.

The reason is that Marketo recursively parses content as Velocity. So "disguising" the few VTL reserved words is difficult, maybe impossible (though I'll keep testing it). Eventually, the parser sees a literal #end.

In future, though I know it can be hard to coordinate this with the web team, avoid using reserved words in your hash: there are only a few (#if #else #elseif #end #set #foreach #define #macro #include #parse #break #stop #evaluate).

Jimmy_Hang
Level 2

Re: How do I make anchor links work in an email?

Thanks for looking into this, Sanford - I will follow your guidance and have our WebDev team eventually update our website to avoid those terms.

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I make anchor links work in an email?

A-ha, URL-encode the "e" to avoid the reparsing error:

<a href="https://plaid.com/legal/#%65nd-user-privacy-policy" target="_blank" class="mktNoTrack" id="">End User Privacy Policy</a>

Some browsers will display the "%65" as "e" in the location bar, others will keep it as "%65", but the anchor link works either way.

Jimmy_Hang
Level 2

Re: How do I make anchor links work in an email?

Amazing, it works! Thanks so much Sanford for all the help!

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I make anchor links work in an email?

Cool, gonna add it to the blog. Can you mark my answer as Correct?

Jimmy_Hang
Level 2

Re: How do I make anchor links work in an email?

Done - thanks again

SanfordWhiteman
Level 10 - Community Moderator

Re: How do I make anchor links work in an email?

Jimmy_Hang
Level 2

Re: How do I make anchor links work in an email?

Nice post! Thanks again