2

I use i18next to translate email templates. They contain buttons which text need to have   to prevent bad rendering on smartphone email readers. To prevent smartphone email reader to split the button into two parts, I do need to have no-break-spaces.

The problem is, i18next escapes html.

Instead of My button, I got My button inside my button.

Here is a simplified version (pseudo code) illustrating what I am trying to achieve:

BTN_ACTION = 'My button';

i18n.init(options, function (t) {
    t('BTN_ACTION')
};

The jade template looks like:

a#btn-create-account(href='url')=t('BTN_ACTION')
apairet
  • 3,162
  • 20
  • 23
  • Did you try using a Unicode character directly in your source, or its code point? `My\u00A0button`? –  Sep 16 '14 at 02:25

1 Answers1

6

Use a Unicode character directly in your source, or its code point, as in My\u00A0button.