diff --git a/forms/MemberDatetimeOptionsetField.php b/forms/MemberDatetimeOptionsetField.php
index d3ef113d7..7cdf9635c 100644
--- a/forms/MemberDatetimeOptionsetField.php
+++ b/forms/MemberDatetimeOptionsetField.php
@@ -35,17 +35,27 @@ class MemberDatetimeOptionsetField extends OptionsetField {
$value = ($this->value && !array_key_exists($this->value, $this->source)) ? $this->value : null;
$checked = ($value) ? " checked=\"checked\"" : '';
$options .= "
"
- . sprintf("",
- $itemID, $this->name, $checked)
- . sprintf('',
- $itemID, _t('MemberDatetimeOptionsetField.Custom', 'Custom'))
- . sprintf("\n", $this->name, $value)
- . sprintf("",
- $this->Link() . '/validate');
+ . sprintf(
+ "",
+ $itemID, $this->name,
+ $checked
+ )
+ . sprintf(
+ '',
+ $itemID, _t('MemberDatetimeOptionsetField.Custom', 'Custom')
+ )
+ . sprintf(
+ "\n",
+ $this->name, Convert::raw2xml($value)
+ )
+ . sprintf(
+ "",
+ $this->Link() . '/validate'
+ );
$options .= ($value) ? sprintf(
'(%s: "%s")',
_t('MemberDatetimeOptionsetField.Preview', 'Preview'),
- Zend_Date::now()->toString($value)
+ Convert::raw2xml(Zend_Date::now()->toString($value))
) : '';
$options .= sprintf(
'%s',