aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-09-29 18:52:38 +0200
committerArthurHoaro <arthur@hoa.ro>2017-09-29 18:52:38 +0200
commit601faf97516a836e4ae57dc4cecb9225c0a04338 (patch)
treec4ec24abaec4f1ff5fc272146cd9a908f7571fef /tests
parent0cba184cf80423d990aba09a2a0a1f2b9c5882b7 (diff)
downloadShaarli-601faf97516a836e4ae57dc4cecb9225c0a04338.tar.gz
Shaarli-601faf97516a836e4ae57dc4cecb9225c0a04338.tar.zst
Shaarli-601faf97516a836e4ae57dc4cecb9225c0a04338.zip
Fix parsing for description links with parentheses
With markdown plugin disabled relates to #966
Diffstat (limited to 'tests')
-rw-r--r--tests/LinkUtilsTest.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/LinkUtilsTest.php b/tests/LinkUtilsTest.php
index 7c0d4b0b..c77922ec 100644
--- a/tests/LinkUtilsTest.php
+++ b/tests/LinkUtilsTest.php
@@ -103,6 +103,16 @@ class LinkUtilsTest extends PHPUnit_Framework_TestCase
103 $expectedText = 'stuff <a href="http://hello.there/is=someone#here">http://hello.there/is=someone#here</a> otherstuff'; 103 $expectedText = 'stuff <a href="http://hello.there/is=someone#here">http://hello.there/is=someone#here</a> otherstuff';
104 $processedText = text2clickable($text, ''); 104 $processedText = text2clickable($text, '');
105 $this->assertEquals($expectedText, $processedText); 105 $this->assertEquals($expectedText, $processedText);
106
107 $text = 'stuff http://hello.there/is=someone#here(please) otherstuff';
108 $expectedText = 'stuff <a href="http://hello.there/is=someone#here(please)">http://hello.there/is=someone#here(please)</a> otherstuff';
109 $processedText = text2clickable($text, '');
110 $this->assertEquals($expectedText, $processedText);
111
112 $text = 'stuff http://hello.there/is=someone#here(please)&no otherstuff';
113 $expectedText = 'stuff <a href="http://hello.there/is=someone#here(please)&no">http://hello.there/is=someone#here(please)&no</a> otherstuff';
114 $processedText = text2clickable($text, '');
115 $this->assertEquals($expectedText, $processedText);
106 } 116 }
107 117
108 /** 118 /**