I noticed that custom "Other..." text was not coming through on the forms and found two minor logical errors with !empty() checks. [Would reversing the inline conditional be better, I hate !empty() or !isset() as it is so hard to see the "!"]

Also there was no check_plain on the $element['#other'] text, guessing that this is a security hole, but I haven't followed the code through. Also on _webform_analysis_component().

Finally moved the check_plain onto the actual user data rather than both this and t('Other...') for the export. May save 1000000th of a second of execution speed... :)

CommentFileSizeAuthor
webform-other-text-conditional.patch2.47 KBalan d.

Comments

quicksketch’s picture

Status: Needs review » Fixed

Thanks Alan! Everything looks great. I think it's actually possible for us to drop the !empty() entirely because Webform sets default properties on all components. However committing the patch as-is didn't require any additional testing to ensure this, so I went ahead and committed it as-is. Thanks!

Status: Fixed » Closed (fixed)

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