HTML-escaping select option titles (Ticket #1577)

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3761 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2006-10-28 16:02:58 +00:00
parent 02df38c26f
commit 802ec2d913
2 changed files with 2 additions and 2 deletions

View file

@ -373,7 +373,7 @@ class FormHelper extends AppHelper {
} }
if($showParents || (!in_array($title, $parents))) { if($showParents || (!in_array($title, $parents))) {
$select[] = sprintf($this->tags['selectoption'], $name, $this->Html->parseHtmlOptions($htmlOptions), $title); $select[] = sprintf($this->tags['selectoption'], $name, $this->Html->parseHtmlOptions($htmlOptions), h($title));
} }
} }
} }

View file

@ -588,7 +588,7 @@ class HtmlHelper extends AppHelper {
$optionsHere['selected'] = 'selected'; $optionsHere['selected'] = 'selected';
} }
$select[] = sprintf($this->tags['selectoption'], $name, $this->parseHtmlOptions($optionsHere), $title); $select[] = sprintf($this->tags['selectoption'], $name, $this->parseHtmlOptions($optionsHere), h($title));
} }
$select[] = sprintf($this->tags['selectend']); $select[] = sprintf($this->tags['selectend']);