Fixed improper Markdown escaping for some tooltips

This commit is contained in:
Frederic Guillot
2016-04-29 18:43:57 -04:00
parent a34f83fb30
commit 9fa8f63d25
11 changed files with 30 additions and 9 deletions

View File

@@ -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);