#46 Added _htmlEntities() in my_reporter.php

open
nobody
None
5
2011-12-07
2011-12-07
Anonymous
No

I found a bug, and it didn't show in the details-section of the testcase the HTML, instead the browser parsed the HTML.

So I added htmlentities(), and later is saw there's already a $this->_htmlEntities() so I used that instead.

Here my patch.

--- a/tests/simpletest/extensions/my_reporter.php
+++ b/tests/simpletest/extensions/my_reporter.php
@@ -187,7 +187,7 @@ class MyReporter extends SimpleReporter {
<div class="result">PASSED</div>
<h3>'.$test.'</h3>
<div class="details">
- <em>'.$message.'</em>
+ <em>'.$this->_htmlEntities($message).'</em>
</div>
</div>
';
@@ -211,7 +211,7 @@ class MyReporter extends SimpleReporter {
<div class="result">FAILED</div>
<h3>'.$test.'</h3>
<div class="details">
- <em>'.$message.'</em>
+ <em>'.$this->_htmlEntities($message).'</em>
</div>
</div>
';

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks