A select list value with ampersand character does not match component value after form is submitted.
This causes the selected value to not be written to database, thus not appearing in results. Example:

Air & Accommodation

...after form is POSTed, _webform_safe_name() will convert value to:

air__amp_accommodation

Before POST, _webform_safe_name() will convert value to:

air__accommodation

The & character becomes & with both non-alphanumeric characters being removed results
in the above misplaced 'amp'. I assume this applies to all HTML entities.

I've attached a patch that does html_entity_decode() in _webform_safe_name() which resolved the
problem for me. This may have unforeseen consequences and not be best solution. Feedback welcome.

CommentFileSizeAuthor
webform_html_entity_post.patch479 bytesbrendanb

Comments

GoofyX’s picture

I think this bug is similar.

quicksketch’s picture

Status: Needs review » Closed (duplicate)

The solution in the issue GoofyX linked to is the proper fix for this problem. If it exists somewhere else besides the select component, we should fix it in a similar manner. I'm going to assume that you were referring to a problem with select components brendan, so the problem has already been fixed. If it's a problem with another component however, please reopen or make a new ticket for whichever component is have the problem.