HTML in snippets are being stripped | Community
Skip to main content
October 14, 2015
Solved

HTML in snippets are being stripped

  • October 14, 2015
  • 2 replies
  • 1691 views

We had a few rich snippets with custom HTML that were working perfectly fine before. But now, when we made changes to the snippets, some HTML does not save. It looks like Marketo is filtering the HTML before saving.

Before:

<a class="some-class" onclick="custom_js_function('facebook')" href="javascript:void(0);"> <em class="social-login-icon facebook"></em> Facebook </a> 

Changes to

<a class="some-class"> Facebook </a>

Is there a way to put onclick on the links inside snippets?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by dadoly

Hi,

This is due to the new HTML editor. If you revert to the legacy editor, this will work as before. That can be done under Admin > Treasure Chest by disabling Upgraded TinyMCE.

Cheers,
Mel

2 replies

dadolyAdobe EmployeeAccepted solution
Adobe Employee
October 14, 2015

Hi,

This is due to the new HTML editor. If you revert to the legacy editor, this will work as before. That can be done under Admin > Treasure Chest by disabling Upgraded TinyMCE.

Cheers,
Mel

Justin_Cooperm2
Level 10
October 14, 2015

This is actually resolved in the new editor in the upcoming October release. Only small issue is that I tested it and it still strips href="javascript:void(0);" for some reason. We will look into why. Curious why you even have that though. Does it even do anything since you already have the onclick

Justin_Cooperm2
Level 10
October 14, 2015

Ok I looked into it. The reason javascript is still stripped is because we had special logic in place for Email content and Snippets (since they can be used in emails). JavaScript is generally not functional in emails and often times it lowers the trust score in terms of spam filters. I will have our engineers remove this validation so that even JS is allowed but I do warn you not to insert this type of stuff into emails.