Adding fix for Ticket #2285

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4671 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-03-25 01:16:29 +00:00
parent 12f99cd1e9
commit 8fa50d9100

View file

@ -283,7 +283,7 @@ class Helper extends Overloadable {
$attribute = sprintf($attributeFormat, $key, $key);
}
} else {
$attribute = sprintf($attributeFormat, $key, htmlspecialchars($value));
$attribute = sprintf($attributeFormat, $key, h($value));
}
return $attribute;
}
@ -457,7 +457,7 @@ class Helper extends Overloadable {
$result = null;
if (isset($this->data[$this->model()][$this->field()])) {
$result = h($this->data[$this->model()][$this->field()]);
$result = $this->data[$this->model()][$this->field()];
} elseif (isset($this->data[$this->field()]) && is_array($this->data[$this->field()])) {
if (ClassRegistry::isKeySet($this->field())) {
$key =& ClassRegistry::getObject($this->field());