summaryrefslogtreecommitdiff
path: root/tests/units/Helper
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-02-23 18:51:11 -0500
committerFrederic Guillot <fred@kanboard.net>2017-02-23 18:51:11 -0500
commitdd579937e36ec494372d8d99b49d0943ea2b721d (patch)
treebb6817dc1c8269ac1ddac6561b48ecca0057b01f /tests/units/Helper
parent73b2f51fe53a9227fbea2ef8455672ec53e636ce (diff)
Add helper method to use implode() with HTML escaping
Diffstat (limited to 'tests/units/Helper')
-rw-r--r--tests/units/Helper/TextHelperTest.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/units/Helper/TextHelperTest.php b/tests/units/Helper/TextHelperTest.php
index 35ed5a1e..abe921fe 100644
--- a/tests/units/Helper/TextHelperTest.php
+++ b/tests/units/Helper/TextHelperTest.php
@@ -9,6 +9,13 @@ use Kanboard\Model\UserModel;
class TextHelperTest extends Base
{
+ public function testImplode()
+ {
+ $textHelper = new TextHelper($this->container);
+ $html = '&lt;img src=x onerror=alert(0)&gt;';
+ $this->assertEquals($html, $textHelper->implode(', ', array('<img src=x onerror=alert(0)>')));
+ }
+
public function testMarkdownTaskLink()
{
$textHelper = new TextHelper($this->container);