bbcode test fixes
This commit is contained in:
parent
d7d2bf7418
commit
5d8169c577
1 changed files with 3 additions and 7 deletions
|
@ -62,7 +62,7 @@ class BBCodeUnitTest extends UnitTestCase {
|
||||||
"<a href=\"http://shishnet.org\">ShishNet</a>");
|
"<a href=\"http://shishnet.org\">ShishNet</a>");
|
||||||
$this->assertEqual(
|
$this->assertEqual(
|
||||||
$this->filter("[url=javascript:alert(\"owned\")]click to fail[/url]"),
|
$this->filter("[url=javascript:alert(\"owned\")]click to fail[/url]"),
|
||||||
"[url=javascript:alert("owned")]click to fail[/url]");
|
"[url=javascript:alert(\"owned\")]click to fail[/url]");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testEmailURL() {
|
public function testEmailURL() {
|
||||||
|
@ -73,16 +73,12 @@ class BBCodeUnitTest extends UnitTestCase {
|
||||||
|
|
||||||
private function filter($in) {
|
private function filter($in) {
|
||||||
$bb = new BBCode();
|
$bb = new BBCode();
|
||||||
$tfe = new TextFormattingEvent($in);
|
return $bb->format($in);
|
||||||
$bb->receive_event($tfe);
|
|
||||||
return $tfe->formatted;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function strip($in) {
|
private function strip($in) {
|
||||||
$bb = new BBCode();
|
$bb = new BBCode();
|
||||||
$tfe = new TextFormattingEvent($in);
|
return $bb->strip($in);
|
||||||
$bb->receive_event($tfe);
|
|
||||||
return $tfe->stripped;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Reference in a new issue