• Resolved lupusyon

    (@lupusyon)


    Hello, version 3.100.1 of Mailpoet 3 causes a site-breaking JS error with its default Italian translation, as, it appears, an apostrophe is not correctly escaped and interpreted as a single quote. We’ve tracked the issue and it appears to happen in lib/Twig/I18n.php on line 60 in the “localize” public method of class “I18n”:

    ‘MailPoet.I18n.add(“‘ . $key . ‘”, “‘ . str_replace(‘”‘, ‘\”‘, $translation) . ‘”);’;

    The official Italian translation for the “ajaxFailedErrorMessage” is “Si è verificato un errore nell’elaborazione della richiesta, riprova più tardi.” (“An error has happened while performing a request, please try again later.”), the unescaped apostrophe after “nell” causes JS to interpret it as a closing quote:

    MailPoet.I18n.add(‘ajaxFailedErrorMessage’, ‘Si è verificato un errore nell’elaborazione della richiesta, riprova più tardi.’)

    That causes an error which, in our case, prevents further Javascript from working. I’ve temporarily fixed the issue on our website but I ask you to address this as soon as possible, thank you.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Bug report – JS error with translation string’ is closed to new replies.