Skip to content

Commit

Permalink
Adding htmlentities() to all parameters passed into the HtmlReporter.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Apr 29, 2010
1 parent a08c09a commit e4ea82d
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions cake/tests/lib/reporter/cake_html_reporter.php
Expand Up @@ -27,7 +27,17 @@
* @subpackage cake.tests.lib
*/
class CakeHtmlReporter extends CakeBaseReporter {

/**
* Constructor
*
* @param string $charset
* @param string $params
* @return void
*/
function CakeHtmlReporter($charset = 'utf-8', $params = array()) {
$params = array_map(array($this, '_htmlEntities'), $params);
$this->CakeBaseReporter($charset, $params);
}
/**
* Paints the top of the web page setting the
* title to the name of the starting test.
Expand All @@ -39,7 +49,7 @@ public function paintHeader($testName) {
$this->sendNoCacheHeaders();
$this->paintDocumentStart();
$this->paintTestMenu();
echo "<h2>$testName</h2>\n";
printf("<h2>%s</h2>\n", $this->_htmlEntities($testName));
echo "<ul class='tests'>\n";
}

Expand Down

0 comments on commit e4ea82d

Please sign in to comment.