The current implementation runs everything through check_plain(), which converts "&" to "&".
Reusing the model from _webform_filter_values(), an implementation of a $strict argument might be a good idea.

I've quickly hacked it by altering the _webform_viewselect_options() function to the following:

function _webform_viewselect_options($view,$args = '',$strict = TRUE) {
  $options = array();

  // Prepare field array - Reusing CCK nodreference function _nodereference_potential_references()
  $field['advanced_view'] = $view;
  $field['advanced_view_args'] = $args;
  // Field name used for cid in _nodereference_potential_references
  $field['field_name'] = md5($view.$args); 
  
  $data = _nodereference_potential_references($field);
  
  foreach($data as $index => $row) {
    $options[$index] = ($strict)? check_plain($row['title']) : $row['title']; 
  }
  
  return $options;
}

And then calling it using a $strict=false arg from _webform_render_viewselect() (line #179) like this:

$options = _webform_viewselect_options($component['extra']['advanced']['advanced_view'],$args, FALSE);

_webform_filter_values() uses filter_xss() instead of check_plan(), but as I'm unsure of the effects, I'll leave it using check_plain for now.

Comments

freakalis’s picture

Status: Active » Fixed

Thank you for reporting and added solution, this has been fixed in the latest dev.

Status: Fixed » Closed (fixed)

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