aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/includes/BBCodeTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/includes/BBCodeTest.php')
-rw-r--r--tests/unit/includes/BBCodeTest.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unit/includes/BBCodeTest.php b/tests/unit/includes/BBCodeTest.php
index c6a60f35b..136fc6e0e 100644
--- a/tests/unit/includes/BBCodeTest.php
+++ b/tests/unit/includes/BBCodeTest.php
@@ -143,6 +143,14 @@ class BBCodeTest extends UnitTestCase {
'example url: https://example.com',
'example url: <a href="https://example.com" target="_blank" rel="nofollow noopener">https://example.com</a>'
],
+ 'naked url followed by newline' => [
+ "https://www.example.com\nhave a great day.",
+ '<a href="https://www.example.com" target="_blank" rel="nofollow noopener">https://www.example.com</a><br />have a great day.',
+ ],
+ 'inline naked url' => [
+ "This is a link https://example.com/some/path more info.",
+ 'This is a link <a href="https://example.com/some/path" target="_blank" rel="nofollow noopener">https://example.com/some/path</a> more info.',
+ ],
'naked url within code block is not converted to link' => [
"[code]\nhttp://example.com\n[/code]",
"<pre><code>http://example.com</code></pre>"