Add helper method to use implode() with HTML escaping

This commit is contained in:
Frederic Guillot
2017-02-23 18:51:11 -05:00
parent 73b2f51fe5
commit dd579937e3
4 changed files with 23 additions and 2 deletions

View File

@@ -9,6 +9,13 @@ use Kanboard\Model\UserModel;
class TextHelperTest extends Base
{
public function testImplode()
{
$textHelper = new TextHelper($this->container);
$html = '<img src=x onerror=alert(0)>';
$this->assertEquals($html, $textHelper->implode(', ', array('<img src=x onerror=alert(0)>')));
}
public function testMarkdownTaskLink()
{
$textHelper = new TextHelper($this->container);