Better handling of external link style assignment.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@792 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+3
-1
@@ -784,7 +784,9 @@ class RedCloth < String
|
||||
atts << " title=\"#{ title }\"" if title
|
||||
atts = shelve( atts ) if atts
|
||||
|
||||
"#{ pre }<a#{ atts }>#{ text }</a>#{ post }"
|
||||
external = (url =~ /^http:\/\//) ? ' class="external"' : ''
|
||||
|
||||
"#{ pre }<a#{ atts }#{ external }>#{ text }</a>#{ post }"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@ module Redmine
|
||||
# and URL's prefixed with ! !> !< != (textile images)
|
||||
all
|
||||
else
|
||||
%(#{leading}<a href="#{proto=="www."?"http://www.":proto}#{url}">#{proto + url}</a>#{post})
|
||||
%(#{leading}<a class="external" href="#{proto=="www."?"http://www.":proto}#{url}">#{proto + url}</a>#{post})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user