Fix bug.
This commit is contained in:
parent
6def60f8dd
commit
7d3ebbf54b
|
@ -74,7 +74,7 @@ class Research
|
|||
pd_data = []
|
||||
fields_to_show.collect do |t|
|
||||
if t == "research_title"
|
||||
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_research')}' title='#{p.send(t)}'>#{p.send(t)}" }
|
||||
pd_data << { "data_title" => "<a href=\"#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_research')}\" title=\"#{p.send(t)}\">#{p.send(t)}</a>" }
|
||||
elsif t == "research_category"
|
||||
pd_data << {"data_title" => (p.research_category.title rescue "")}
|
||||
else
|
||||
|
@ -107,17 +107,17 @@ class Research
|
|||
self.research_files.each do |research_file|
|
||||
url = research_file.file.url
|
||||
title = (research_file.title.blank? ? File.basename(research_file.file.path) : research_file.title)
|
||||
files << "<li><a href='#{url}' target='_blank'>#{title}</li>"
|
||||
files << "<li><a href=\"#{url}\" target='_blank'>#{title}</a></li>"
|
||||
end
|
||||
value = files.join("")
|
||||
when "authors"
|
||||
path = OrbitHelper.url_to_plugin_show(self.member_profile.to_param, 'member') rescue '#'
|
||||
value = "<a href='#{path}'>#{self.member_profile.name}</a>"
|
||||
value = "<a href=\"#{path}\">#{self.member_profile.name}</a>"
|
||||
else
|
||||
value = self.send(field) rescue ""
|
||||
end
|
||||
|
||||
value = (value =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "<a href='#{value}' target='blank'>#{value}</a>" : value
|
||||
value = (value =~ /\A#{URI::regexp(['http', 'https'])}\z/) ? "<a href=\"#{value}\" target='blank'>#{value}</a>" : value
|
||||
|
||||
{
|
||||
"key"=>field,
|
||||
|
|
Loading…
Reference in New Issue