X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2Fplugins%2FPluginMarkdownTest.php;h=67bf8968dfcdac199d3ed7d648e6275909b89e8c;hb=1328d222680edf2ebdaea5624a7496240bd075f0;hp=fa7e1d52ddd1dd126ecb15f0cd1e262f7895c68a;hpb=ebd67c6e1b40aebdd3a52285ce9ff9412b2a3038;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/plugins/PluginMarkdownTest.php b/tests/plugins/PluginMarkdownTest.php index fa7e1d52..67bf8968 100644 --- a/tests/plugins/PluginMarkdownTest.php +++ b/tests/plugins/PluginMarkdownTest.php @@ -149,4 +149,22 @@ class PluginMarkdownTest extends PHPUnit_Framework_TestCase $data = hook_markdown_render_daily($data); $this->assertEquals($str, $data['cols'][0][0]['formatedDescription']); } + + /** + * Make sure that the HTML tags are escaped. + */ + public function testMarkdownWithHtmlEscape() + { + $md = '**strong** strong'; + $html = '

strong <strong>strong</strong>

'; + $data = array( + 'links' => array( + 0 => array( + 'description' => $md, + ), + ), + ); + $data = hook_markdown_render_linklist($data); + $this->assertEquals($html, $data['links'][0]['description']); + } }