summaryrefslogtreecommitdiffstats
path: root/modules/markup/html_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/html_test.go')
-rw-r--r--modules/markup/html_test.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go
index f430cb04be..ff68201995 100644
--- a/modules/markup/html_test.go
+++ b/modules/markup/html_test.go
@@ -104,6 +104,15 @@ func TestRender_links(t *testing.T) {
test(
"http://142.42.1.1/",
`<p><a href="http://142.42.1.1/" rel="nofollow">http://142.42.1.1/</a></p>`)
+ test(
+ "https://github.com/go-gitea/gitea/?p=aaa/bbb.html#ccc-ddd",
+ `<p><a href="https://github.com/go-gitea/gitea/?p=aaa/bbb.html#ccc-ddd" rel="nofollow">https://github.com/go-gitea/gitea/?p=aaa/bbb.html#ccc-ddd</a></p>`)
+ test(
+ "https://en.wikipedia.org/wiki/URL_(disambiguation)",
+ `<p><a href="https://en.wikipedia.org/wiki/URL_(disambiguation)" rel="nofollow">https://en.wikipedia.org/wiki/URL_(disambiguation)</a></p>`)
+ test(
+ "https://foo_bar.example.com/",
+ `<p><a href="https://foo_bar.example.com/" rel="nofollow">https://foo_bar.example.com/</a></p>`)
// Test that should *not* be turned into URL
test(