Fixed that www followed by a dot generates broken links in formatted text (#3676).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11473 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
458800c1d5
commit
dfca67d844
@ -95,7 +95,7 @@ module Redmine
|
|||||||
(?:www\.) # www.*
|
(?:www\.) # www.*
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
(\S+?) # url
|
([^<]\S*?) # url
|
||||||
(\/)? # slash
|
(\/)? # slash
|
||||||
)
|
)
|
||||||
((?:>)?|[^[:alnum:]_\=\/;\(\)]*?) # post
|
((?:>)?|[^[:alnum:]_\=\/;\(\)]*?) # post
|
||||||
|
@ -84,7 +84,10 @@ class ApplicationHelperTest < ActionView::TestCase
|
|||||||
# escaping
|
# escaping
|
||||||
'http://foo"bar' => '<a class="external" href="http://foo"bar">http://foo"bar</a>',
|
'http://foo"bar' => '<a class="external" href="http://foo"bar">http://foo"bar</a>',
|
||||||
# wrap in angle brackets
|
# wrap in angle brackets
|
||||||
'<http://foo.bar>' => '<<a class="external" href="http://foo.bar">http://foo.bar</a>>'
|
'<http://foo.bar>' => '<<a class="external" href="http://foo.bar">http://foo.bar</a>>',
|
||||||
|
# invalid urls
|
||||||
|
'http://' => 'http://',
|
||||||
|
'www.' => 'www.',
|
||||||
}
|
}
|
||||||
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
|
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user