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