From 9fa8f63d25a1bd1b2ce17c5dc610680aefa290fe Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Fri, 29 Apr 2016 18:43:57 -0400 Subject: Fixed improper Markdown escaping for some tooltips --- tests/units/Helper/TextHelperTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/units/Helper') 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('

Text @admin @notfound

', $h->markdown('Text @admin @notfound', true)); } + public function testMarkdownAttribute() + { + $helper = new TextHelper($this->container); + $this->assertEquals('<p>Ça marche</p>', $helper->markdownAttribute('Ça marche')); + $this->assertEquals('<p>Test with &quot;double quotes&quot;</p>', $helper->markdownAttribute('Test with "double quotes"')); + $this->assertEquals('<p>Test with 'single quotes'</p>', $helper->markdownAttribute("Test with 'single quotes'")); + } + public function testFormatBytes() { $h = new TextHelper($this->container); -- cgit v1.2.3