# One translation string was skipped because it contains disallowed HTML. #7 translation strings were skipped because they contain disallowed HTML.

Ok, i think there are some HTML tags not supported, but which are them?
Thanks!

Comments

psicomante’s picture

Category: bug » support
gábor hojtsy’s picture

Project: Localization server » Drupal core
Version: 6.x-1.0-alpha4 » 6.x-dev
Component: Code » locale.module
Status: Active » Postponed (maintainer needs more info)

Drupal core works this way. You do not get this error from l10n_server right, but when importing the translation to Drupal? See http://api.drupal.org/api/function/locale_string_is_safe/6 for the list of allowed tags. Drupal core strings pass this for sure. Do you have a module which does not?

psicomante’s picture

When importing the "all-in-one" po file of Drupal core in Drupal 6.13 i get that error. And if i export the CVS package i get this error
http://drupal.org/node/539670

THanks Gàbor.

gábor hojtsy’s picture

http://drupal.org/node/539670 has a clear error message on your modules-filter.po, so there you have an issue. Look into there and see whether you see anything unusual around line 58 as the error message says. I think the two errors can be related.

psicomante’s picture

Found the issue!

#: modules/filter/filter.module:187
msgid ""
"\n"
"<p>This site allows HTML content. While learning all of HTML may feel "
"intimidating, learning how to use a very small number of the most "
"basic HTML \"tags\" is very easy. This table provides examples for "
"each tag that is enabled on this site.</p>\n"
"<p>For more information see W3C's <a "
"href=\"http://www.w3.org/TR/html/\">HTML Specifications</a> or use "
"your favorite search engine to find other sites that explain HTML.</p>"
msgstr ""
"<p>Questo sito consente l'uso di contenuto HTML. Se imparare tutto "
"l'HTML può spaventare, imparare a usare un piccolo numero di elementi "
"HTML di base è molto semplice. Questa tabella fornisce un esempio per "
"ogni elemento attivo su questo sito.</p>\r\n"
"<p>Per maggiori informazioni, vedi le <a "
"href=\"http://www.w3.org/TR/html/\">Specifiche HTML del W3C</a> o "
"utilizza il tuo motore di ricerca preferito per trovare un altro sito "
"che spieghi l'HTML.</p>"
gábor hojtsy’s picture

Uhm, but what dangerous tags would be in this text? I see none. Also, the error above says 7 such messages were found with dangerous tags.

psicomante’s picture

ehm i don't know. I see there are other 6 identical msgstr errors in others files.

psicomante’s picture

forgot one thing: see at "\n". It misses in the translated string. I was wondering if there is a way to search these problems in l10n_server.

gábor hojtsy’s picture

Status: Postponed (maintainer needs more info) » Active

Theoretically, we have code in l10n_server for exactly this, so when you submit a translation, the beginning and ending whitespace on the translation is first stripped and then added as in the source string. Not sure why it did not apply here. Maybe we only do that when you enter text on the UI and not when you import?

psicomante’s picture

Status: Active » Postponed (maintainer needs more info)

i'm using the SQL query

SELECT value
FROM  `l10n_l10n_community_string` 
WHERE  `value` LIKE  '\n%'
LIMIT 0 , 30
psicomante’s picture

i found others string in that exported .po that doesn't match the "is_safe" verification.

<a href"@permissions">
<a href =\"@clean--url\">

and other two...

Anyway i must added the "\n" in the l10n_server UI manually. Now it should work. I think we should make some test, because i don't know if the user doesn't add the "\n" at the top, l10n_server add it automatically.

Thank you for support.

gábor hojtsy’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)

#1020842: Error messages when importing translated strings fails are not helpful at all is about providing better error messages for this (among fixing some core strings). Marking as a duplicate.