Closed (fixed)
Project:
Webform HTML Textarea
Version:
7.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Mar 2012 at 14:56 UTC
Updated:
15 Feb 2013 at 06:49 UTC
When setting up a wysiwyg text area in a webform and setting the default value to be a table (e.g. <table><tr><td>some text</td></tr></table>), the default value is filtered and the table tags are striped from the field. But when you enter the table by hand in a new record and save it, the tags are retained.
I've created a special Text Format for this field specifically and removed any filtering without success.
Looking into the code, the #default_value element [in function _webform_render_html_textarea()] seems to be always populated with a filtered value on a new record but if the record exists, no filtering is applied.
Is it possible that I'm missing a setting somewhere?
Thanks,
Wade
Comments
Comment #1
jelle_sYou're absolutely right, fixed in the latest dev. I'll create a new release as well.
Comment #3
christian_fs commentedI think that the bug is still happening.
I've seen that the problem is the line 152:
'#default_value' => $filter ? _webform_filter_values($component['value']) : $component['value'],
And it can be fixed by replacing the line by:
'#default_value' => $filter ? _webform_filter_values($component['value'],NULL,NULL,NULL,false) : $component['value'],
Comment #4
MickC commentedI've tried both the dev and the suggestion in #3 with no success.
Any way I can get the default value to appear as HTML without filtering?
Thanks