Hi all,
I've a MARKUP webform component, that contains HTML (some <p> and a link <a href...)
When I translate this component, using i18n_string translation, the html is converted in printable font, e.g:
<p> becames <p>
<a becames <a
and so on. In this way the HTML si printed out as a string on my page.
What's wrong?!?!
Thank you very much
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | certain_fields_unfiltered-1796748-5.patch | 904 bytes | bc |
| #1 | 1796748-1.patch | 1.02 KB | stella |
Comments
Comment #0.0
mxtFormatting error
Comment #1
stella commentedPatch attached that fixes this, but should possibly be extended to other component types, not sure.
Comment #2
GDrupal commented@stella thanks for this! Will be posting the review soon.
Comment #3
GDrupal commentedCommitted! thanks you all ;)
Comment #4
mxtYes, I can confirm that the patch works well.
Thank you very much!
Comment #4.0
mxtI've to learn to use the
Comment #5
bc commentedSeeing as webform uses its own filter (webform_filter_xss), what responsibility should webform_localization have for filtering?
I'm currently building a site with webform descriptions that contain HTML tags specified in the webform_allowed_tags variable. As a stopgap fix, I've added a condition in includes/webform_localization.i18n.inc:
This is overkill, as the string is run through the full_html filter as well as filter_xss/webform_filter_xss
In addition to #description, webform also uses webform_filter_xss on #field_prefix, #field_suffix, #title, as well as a bunch of grid strings.
Any thoughts on this?
Comment #6
bc commentedComment #7
mvc@bc: moved this to a new ticket rather than hijacking a fixed one, see #2223335: Translation of component description: HTML escaped