diff --git a/forms/TreeDropdownField.php b/forms/TreeDropdownField.php index b336c71ce..1d281f5cf 100755 --- a/forms/TreeDropdownField.php +++ b/forms/TreeDropdownField.php @@ -233,8 +233,14 @@ class TreeDropdownField extends FormField { } } + if($obj->escapeTypeForField($this->labelField) == 'xml') { + $labelFieldEval = '$child->' . $this->labelField; + } else { + $labelFieldEval = 'Convert::raw2xml($child->' . $this->labelField . ')'; + } + $eval = '"
  • Name() . '-{$child->' . $this->keyField . '}\" class=\"$child->class"' . - ' . $child->markingClasses() . "\">ID\">" . $child->' . $this->labelField . ' . ""'; + ' . $child->markingClasses() . "\">ID\">" . ' . $labelFieldEval . ' . ""'; if($isSubTree) { return substr(trim($obj->getChildrenAsUL('', $eval, null, true)), 4, -5);