summaryrefslogtreecommitdiff
path: root/tests/units/Helper
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-04-29 18:43:57 -0400
committerFrederic Guillot <fred@kanboard.net>2016-04-29 18:43:57 -0400
commit9fa8f63d25a1bd1b2ce17c5dc610680aefa290fe (patch)
tree7348ec8646c4f08ad4515aa15e2cdd689b005f10 /tests/units/Helper
parenta34f83fb3044b51a8cb519a97ad27853ef4a068a (diff)
Fixed improper Markdown escaping for some tooltips
Diffstat (limited to 'tests/units/Helper')
-rw-r--r--tests/units/Helper/TextHelperTest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/units/Helper/TextHelperTest.php b/tests/units/Helper/TextHelperTest.php
index c6b55d0e..2787abf2 100644
--- a/tests/units/Helper/TextHelperTest.php
+++ b/tests/units/Helper/TextHelperTest.php
@@ -51,6 +51,14 @@ class TextHelperTest extends Base
$this->assertEquals('<p>Text @admin @notfound</p>', $h->markdown('Text @admin @notfound', true));
}
+ public function testMarkdownAttribute()
+ {
+ $helper = new TextHelper($this->container);
+ $this->assertEquals('&lt;p&gt;&Ccedil;a marche&lt;/p&gt;', $helper->markdownAttribute('Ça marche'));
+ $this->assertEquals('&lt;p&gt;Test with &amp;quot;double quotes&amp;quot;&lt;/p&gt;', $helper->markdownAttribute('Test with "double quotes"'));
+ $this->assertEquals('&lt;p&gt;Test with &#039;single quotes&#039;&lt;/p&gt;', $helper->markdownAttribute("Test with 'single quotes'"));
+ }
+
public function testFormatBytes()
{
$h = new TextHelper($this->container);