aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/includes/BBCodeTest.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-03-24 17:50:27 +0100
committerMario <mario@mariovavti.com>2024-03-24 17:00:56 +0000
commit7c4362db536414302477e85a3e840ac58bd1e084 (patch)
tree8678f0c6a2fe793526c08a1fb682c543957e12be /tests/unit/includes/BBCodeTest.php
parentf7bf9ede7235e70605efd6e85469f5b9aa9ee320 (diff)
downloadvolse-hubzilla-7c4362db536414302477e85a3e840ac58bd1e084.tar.gz
volse-hubzilla-7c4362db536414302477e85a3e840ac58bd1e084.tar.bz2
volse-hubzilla-7c4362db536414302477e85a3e840ac58bd1e084.zip
make sure we preserve linefeeds in the actual content of lists and tables also add tests
(cherry picked from commit 3c0d6339bb12bd7fbf65ba7a79078e39737b4387)
Diffstat (limited to 'tests/unit/includes/BBCodeTest.php')
-rw-r--r--tests/unit/includes/BBCodeTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/unit/includes/BBCodeTest.php b/tests/unit/includes/BBCodeTest.php
index fedd2df06..a6c798992 100644
--- a/tests/unit/includes/BBCodeTest.php
+++ b/tests/unit/includes/BBCodeTest.php
@@ -111,13 +111,25 @@ class BBCodeTest extends UnitTestCase {
"some text\n[list]\n[*] item1\n[*] item2\n[/list]\nsome more text",
'some text<br /><ul class="listbullet"><li> item1<li> item2</ul>some more text'
],
+ 'list with linebreaks \n in text' => [
+ "some text\n[list]\n[*] item1\nsome text[*] item2\nsome text[/list]\nsome more text",
+ 'some text<br /><ul class="listbullet"><li> item1<br />some text<li> item2<br />some text</ul>some more text'
+ ],
'list with linebreaks \r' => [
"some text\r[list]\r[*] item1\r[*] item2\r[/list]\rsome more text",
'some text<br /><ul class="listbullet"><li> item1<li> item2</ul>some more text'
],
+ 'list with linebreaks \r in text' => [
+ "some text\r[list]\r[*] item1\rsome text\r[*] item2\rsome text\r[/list]\rsome more text",
+ 'some text<br /><ul class="listbullet"><li> item1<br />some text<li> item2<br />some text</ul>some more text'
+ ],
'list with linebreaks \r\n' => [
"some text\r\n[list]\r\n[*] item1\r\n[*] item2\r\n[/list]\r\nsome more text",
'some text<br /><ul class="listbullet"><li> item1<li> item2</ul>some more text'
+ ],
+ 'list with linebreaks \r\n in text' => [
+ "some text\r\n[list]\r\n[*] item1\r\nsome text[*] item2\r\nsome text[/list]\r\nsome more text",
+ 'some text<br /><ul class="listbullet"><li> item1<br />some text<li> item2<br />some text</ul>some more text'
]
];
}