1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/14323] Added support for truncating local URLs

PHPBB3-14323
This commit is contained in:
JoshyPHP
2015-12-05 19:48:01 +01:00
parent eb6ceb963e
commit 8fe94a19b4
6 changed files with 37 additions and 16 deletions

View File

@@ -235,6 +235,14 @@ class phpbb_textformatter_s9e_default_formatting_test extends phpbb_test_case
'http://www.phpbb.com/community/path/to/long/url/file.ext#section',
'<a href="http://www.phpbb.com/community/path/to/long/url/file.ext#section" class="postlink">http://www.phpbb.com/community/path/to/ ... xt#section</a>'
),
array(
'http://localhost/ http://localhost/viewforum.php?f=1',
'<a href="http://localhost/" class="postlink">http://localhost/</a> <a href="http://localhost/viewforum.php?f=1" class="postlink">viewforum.php?f=1</a>'
),
array(
'http://localhost/viewforum.php?f=1#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'<a href="http://localhost/viewforum.php?f=1#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" class="postlink">viewforum.php?f=1#xxxxxxxxxxxxxxxxxxxxx ... xxxxxxxxxx</a>'
),
array(
'[quote="[url=http://example.org]xxx[/url]"]...[/quote]',
'<blockquote><div><cite><a href="http://example.org" class="postlink">xxx</a> wrote:</cite>...</div></blockquote>'