diff --git a/forms/CurrencyField.php b/forms/CurrencyField.php index 689652a41..afd893385 100644 --- a/forms/CurrencyField.php +++ b/forms/CurrencyField.php @@ -94,7 +94,7 @@ class CurrencyField_Readonly extends ReadonlyField{ */ function Field() { if($this->value){ - $val = $this->dontEscape ? ($this->reserveNL?Convert::raw2xml($this->value):$this->value) : Convert::raw2xml($this->value); + $val = $this->dontEscape ? $this->value : Convert::raw2xml($this->value); $val = _t('CurrencyField.CURRENCYSYMBOL', '$') . number_format(preg_replace('/[^0-9.]/',"",$val), 2); }else { @@ -126,7 +126,7 @@ class CurrencyField_Disabled extends CurrencyField{ */ function Field() { if($this->value){ - $val = $this->dontEscape ? ($this->reserveNL?Convert::raw2xml($this->value):$this->value) : Convert::raw2xml($this->value); + $val = $this->dontEscape ? $this->value : Convert::raw2xml($this->value); $val = _t('CurrencyField.CURRENCYSYMBOL', '$') . number_format(preg_replace('/[^0-9.]/',"",$val), 2); }else { diff --git a/forms/FormField.php b/forms/FormField.php index 908224055..e409c2105 100644 --- a/forms/FormField.php +++ b/forms/FormField.php @@ -394,7 +394,7 @@ class FormField extends RequestHandler { * Our base FormField class just returns a span containing the value. This should be overridden! */ function Field() { - if($this->value) $value = $this->dontEscape ? ($this->reserveNL ? nl2br($this->value) : $this->value) : Convert::raw2xml($this->value); + if($this->value) $value = $this->dontEscape ? $this->value : Convert::raw2xml($this->value); else $value = '(' . _t('FormField.NONE', 'none') . ')'; $attributes = array( diff --git a/forms/LookupField.php b/forms/LookupField.php index 836fbd4ce..13efe8005 100644 --- a/forms/LookupField.php +++ b/forms/LookupField.php @@ -26,9 +26,7 @@ class LookupField extends DropdownField { if(!isset($mappedValue)) $mappedValue = $this->value ? $this->value : "(none)"; if($this->value) { - $val = $this->dontEscape - ? ($this->reserveNL?Convert::raw2xml($this->value):$this->value) - : Convert::raw2xml($this->value); + $val = $this->dontEscape ? $this->value : Convert::raw2xml($this->value); } else { $val = '(none)'; }