forked from saurabh/orbit4-5
fixed url target issue
This commit is contained in:
parent
03822379b2
commit
179a14d717
|
@ -478,11 +478,13 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def get_target(link)
|
||||
link = link.split("?").first
|
||||
temp_url = URI.parse(link)
|
||||
target = "_blank"
|
||||
if temp_url.host.nil?
|
||||
target = "_self"
|
||||
if link.nil?
|
||||
link = link.split("?").first
|
||||
temp_url = URI.parse(link)
|
||||
target = "_blank"
|
||||
if temp_url.host.nil?
|
||||
target = "_self"
|
||||
end
|
||||
end
|
||||
target
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue