mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-16 20:05:14 +02:00
Add shortened URL link label stripping to PageInfo::stripTrailingUrlFromBody
- Add test cases for shortened URL link labels
This commit is contained in:
parent
da50456675
commit
8de66c0274
2 changed files with 33 additions and 5 deletions
|
@ -108,6 +108,21 @@ class PageInfoTest extends MockedTest
|
|||
'body' => '[url=https://example.com]link label[/url]',
|
||||
'url' => 'https://example.com',
|
||||
],
|
||||
'task-8797-shortened-link-label' => [
|
||||
'expected' => 'content',
|
||||
'body' => 'content [url=https://example.com/page]example.com/[/url]',
|
||||
'url' => 'https://example.com/page',
|
||||
],
|
||||
'task-8797-shortened-link-label-ellipsis' => [
|
||||
'expected' => 'content',
|
||||
'body' => 'content [url=https://example.com/page]example.com…[/url]',
|
||||
'url' => 'https://example.com/page',
|
||||
],
|
||||
'task-8797-shortened-link-label-dots' => [
|
||||
'expected' => 'content',
|
||||
'body' => 'content [url=https://example.com/page]example.com...[/url]',
|
||||
'url' => 'https://example.com/page',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue