Skip to content

Commit

Permalink
Making default bake templates escape HTML. Fixes #1186
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Oct 24, 2010
1 parent eb3cc3d commit c6c3295
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cake/console/templates/default/views/index.ctp
Expand Up @@ -48,7 +48,7 @@
}
}
if ($isKey !== true) {
echo "\t\t<td><?php echo \${$singularVar}['{$modelClass}']['{$field}']; ?>&nbsp;</td>\n";
echo "\t\t<td><?php echo h(\${$singularVar}['{$modelClass}']['{$field}']); ?>&nbsp;</td>\n";
}
}

Expand Down
2 changes: 1 addition & 1 deletion cake/console/templates/default/views/view.ctp
Expand Up @@ -35,7 +35,7 @@ foreach ($fields as $field) {
}
if ($isKey !== true) {
echo "\t\t<dt<?php if (\$i % 2 == 0) echo \$class;?>><?php echo __('" . Inflector::humanize($field) . "'); ?></dt>\n";
echo "\t\t<dd<?php if (\$i++ % 2 == 0) echo \$class;?>>\n\t\t\t<?php echo \${$singularVar}['{$modelClass}']['{$field}']; ?>\n\t\t\t&nbsp;\n\t\t</dd>\n";
echo "\t\t<dd<?php if (\$i++ % 2 == 0) echo \$class;?>>\n\t\t\t<?php echo h(\${$singularVar}['{$modelClass}']['{$field}']); ?>\n\t\t\t&nbsp;\n\t\t</dd>\n";
}
}
?>
Expand Down

0 comments on commit c6c3295

Please sign in to comment.