If I enter T&M in the textfield, then the rendered form displays & where it should be &.

It looks like it's translating the value twice ie
Values with ampersands becomes &

first pass: & becomes & (filter_xss function in _webform_filter_values)
second pass: & becomes & (check_plain for #default_value in core form api)

line: 113 in textfield.inc
'#default_value' => _webform_filter_values($component['value']),

must be like this for fix this bug:
'#default_value' => _webform_filter_values($component['value'], NULL, NULL, FALSE),

Comments

quicksketch’s picture

Status: Needs review » Fixed

Thanks, finally committed to all branches.

Status: Fixed » Closed (fixed)

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