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

jelle_s’s picture

Status: Active » Fixed

You're absolutely right, fixed in the latest dev. I'll create a new release as well.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

christian_fs’s picture

I 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'],

MickC’s picture

I'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