Skip to content
Browse files

Adding htmlentities() to all parameters passed into the HtmlReporter.

  • Loading branch information...
1 parent 813a3af commit c404ae54007690dca3a501c3042e9c8ac56e1d64 @markstory markstory committed
Showing with 12 additions and 2 deletions.
  1. +12 −2 cake/tests/lib/reporter/cake_html_reporter.php
View
14 cake/tests/lib/reporter/cake_html_reporter.php
@@ -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.
@@ -40,7 +50,7 @@ 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";
}

0 comments on commit c404ae5

Please sign in to comment.
Something went wrong with that request. Please try again.