From fd08b50a80c3aed25f9e2a19cbfe9fb3ad35cf1f Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 7 Nov 2017 20:23:58 +0100 Subject: Don't URL encode description links if parameter 'redirector.encode_url' is set to false --- tests/LinkUtilsTest.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'tests/LinkUtilsTest.php') diff --git a/tests/LinkUtilsTest.php b/tests/LinkUtilsTest.php index c77922ec..99679320 100644 --- a/tests/LinkUtilsTest.php +++ b/tests/LinkUtilsTest.php @@ -130,6 +130,21 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase $this->assertEquals($expectedText, $processedText); } + /** + * Test text2clickable a redirector set and without URL encode. + */ + public function testText2clickableWithRedirectorDontEncode() + { + $text = 'stuff http://hello.there/?is=someone&or=something#here otherstuff'; + $redirector = 'http://redirector.to'; + $expectedText = 'stuff http://hello.there/?is=someone&or=something#here otherstuff'; + $processedText = text2clickable($text, $redirector, false); + $this->assertEquals($expectedText, $processedText); + } + /** * Test testSpace2nbsp. */ -- cgit v1.2.3