An obscure Marketo Forms 2.0 bug with Known Lead HTML + non-English characters

If your Marketo forms are only in English — or even if you work in other languages, but the buttons on your forms only use unaccented ASCII characters — you'd never see this bug.

Still, that leaves at least a few people that might've been bitten by it, right?

The bug shows up when you use characters outside the basic Latin set, like the French accent aigu, in custom values for {{form.tokens}} in the Known Lead HTML. For example, if you try to change the submit button text from “Download” to “Télécharger”…

… you're out of luck. The output gets truncated at the second character:

Frustrating, because on the standard form submit button (the one that shows up for anonymous leads, or if you don't have KL HTML enabled), there isn't a problem with those same characters.

Anyway, we have to live with the bug and work around it. Here's what you do. First, only include the first letter of the intended value in the token itself:

Then use some fancy CSS to fill in the remaining text:

.mktoTemplateBox BUTTON[type="submit"]:after {
	content: "élécharger";
}

.mktoTemplateBox A.mktoNotYou:after {
	content: "as vous?";
}

It's weird, but it works: