Fix a tag bug.

This commit is contained in:
BoHung Chiu 2020-11-27 14:46:35 +08:00
parent 0606bda680
commit 9301c212d0
1 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class Experience
pd_data = [] pd_data = []
fields_to_show.collect do |t| fields_to_show.collect do |t|
if t == "organizationt_title" if t == "organizationt_title"
pd_data << { "data_title" => "<a href='#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_experience')}' title='#{p.send(t)}' target='_blank'>#{p.send(t)}" } pd_data << { "data_title" => "<a href=\"#{OrbitHelper.url_to_plugin_show(p.to_param,'personal_experience')}\" title=\"#{p.send(t)}\" target='_blank'>#{p.send(t)}</a>" }
elsif t == "duration" elsif t == "duration"
if !p.send('start_date').nil? or !p.send('end_date').nil? if !p.send('start_date').nil? or !p.send('end_date').nil?
@ -124,7 +124,7 @@ class Experience
value = self.send(field) rescue "" value = self.send(field) rescue ""
end 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, "key"=>field,