Defect #30371 » 0002-URL-followed-by-tag.patch
| lib/redmine/wiki_formatting.rb | ||
|---|---|---|
|
(\/)? # slash
|
||
|
)
|
||
|
((?:>)?|[^[:alnum:]_\=\/;\(\)]*?) # post
|
||
|
(?=<|\s|$)
|
||
|
(?=<|<|\s|$)
|
||
|
}x unless const_defined?(:AUTO_LINK_RE)
|
||
|
# Destructively replaces urls into clickable links
|
||
| lib/redmine/wiki_formatting/textile/redcloth3.rb | ||
|---|---|---|
|
(\/)? # $slash
|
||
|
([^[:alnum:]_\=\/;\(\)]*?) # $post
|
||
|
)
|
||
|
(?=<|\s|$)
|
||
|
(?=<|<|\s|$)
|
||
|
/x
|
||
|
#"
|
||
|
def inline_textile_link( text )
|
||
| test/helpers/application_helper_test.rb | ||
|---|---|---|
|
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
|
||
|
end
|
||
|
def test_textile_external_links_with_followed_by_tag
|
||
|
to_test = {
|
||
|
'"test":http://foo/bar<baz>' => '<a href="http://foo/bar" class="external">test</a><baz>',
|
||
|
}
|
||
|
to_test.each { |text, result| assert_equal "<p>#{result}</p>", textilizable(text) }
|
||
|
end
|
||
|
def test_redmine_links
|
||
|
user_with_email_login = User.generate!(:login => 'abcd@example.com')
|
||
|
user_with_email_login_2 = User.generate!(:login => 'foo.bar@example.com')
|
||
| test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb | ||
|---|---|---|
|
assert_equal expected.gsub(%r{[\r\n\t]}, ''), to_html(text).gsub(%r{[\r\n\t]}, '')
|
||
|
end
|
||
|
def test_should_link_url_with_followed_by_tag
|
||
|
assert_html_output({
|
||
|
'http://www.redmine.org/example<foo>' => '<a class="external" href="http://www.redmine.org/example">http://www.redmine.org/example</a><foo>',
|
||
|
})
|
||
|
end
|
||
|
private
|
||
|
def assert_html_output(to_test, expect_paragraph = true)
|
||
- « Previous
- 1
- 2
- 3
- Next »