git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11564
e93f8b46-1217-0410-a6f0-
8f06a7374b81
(?:www\.) # www.*
)
(
- (\S+?) # url
+ ([^<]\S*?) # url
(\/)? # slash
)
((?:>)?|[^[:alnum:]_\=\/;\(\)]*?) # post
# escaping
'http://foo"bar' => '<a class="external" href="http://foo"bar">http://foo"bar</a>',
# 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) }
end