email bbcode tag

This commit is contained in:
Shish
2009-12-30 09:13:57 +00:00
parent 830635c5a9
commit f3cd5d03a4
2 changed files with 8 additions and 0 deletions

View File

@ -62,6 +62,12 @@ class BBCodeUnitTest extends UnitTestCase {
"[url=javascript:alert("owned")]click to fail[/url]");
}
public function testURL() {
$this->assertEqual(
$this->filter("[email]spam@shishnet.org[/email]"),
"<a href=\"mailto:spam@shishnet.org\">spam@shishnet.org</a>");
}
private function filter($in) {
$bb = new BBCode();
$tfe = new TextFormattingEvent($in);