1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 19:30:21 +02:00

Fix #76, linkify includes dots at end of URL.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
This commit is contained in:
Edward Z. Yang
2016-03-02 02:05:54 -08:00
parent aebe1c02a2
commit 92aabf2b23
3 changed files with 18 additions and 3 deletions

View File

@@ -52,6 +52,14 @@ class HTMLPurifier_Injector_LinkifyTest extends HTMLPurifier_InjectorHarness
$this->assertResult('<a><span>http://example.com</span></a>');
}
public function testRegexIsSmart()
{
$this->assertResult('http://example.com/foo.', '<a href="http://example.com/foo">http://example.com/foo</a>.');
$this->assertResult('“http://example.com/foo”', '“<a href="http://example.com/foo">http://example.com/foo</a>”');
$this->assertResult('“http://example.com”', '“<a href="http://example.com">http://example.com</a>”');
$this->assertResult('(http://example.com/f(o)o)', '(<a href="http://example.com/f(o)o">http://example.com/f(o)o</a>)');
}
}
// vim: et sw=4 sts=4