I'm using entityform to allow users to submit content into a site with a number of different languages, and I'm having issues with double-encoded HTML entities in select lists, and a few other places such as page titles and head titles.

After digging into it a bit, it appears that it's an instance of check_plain being called twice, once in i18n_string_format, and again in form_select_options. Disabling either one causes the string to be encoded once, and thus render correctly.

Another thing I noticed is that none of my strings have a format set in the i18n_strings table... If I manually update that table so that they all use a format of "FILTER_XSS_ADMIN" (or at least don't have a null format) then the issue also goes away, because i18n_string_format doesn't call check_plain but instead calls one of the XSS filtering functions. This also fixes the other occurrences I'm seeing of double encoding, such as in page titles, etc. All of the strings in the site were picked up via the UI string refresh function, but have never been touched via the admin UI, they've only been updated by importing PO files.

Am I doing something wrong here? How can I avoid the double encoding issue? I'm all right with setting a format on the strings, but I'm concerned that I've got something misconfigured somehow for that to be necessary...

Thanks!