diff --git a/lib/prog/channels/syncopator.rb b/lib/prog/channels/syncopator.rb index d239655..096308d 100644 --- a/lib/prog/channels/syncopator.rb +++ b/lib/prog/channels/syncopator.rb @@ -1,4 +1,5 @@ require 'pay_dirt' +require 'cgi' module Prog module Channels @@ -36,9 +37,9 @@ def syncopate "Creation Date" => Time.at(channel[:created]).strftime("%m/%d/%Y"), "Membership" => channel[:num_members], "Status" => channel[:is_archived] ? "Archived" : "Active", - "Channel Purpose" => channel[:purpose][:value], + "Channel Purpose" => CGI.unescapeHTML(channel[:purpose][:value]), "Last Activity" => Time.at((channel_details&.latest&.ts || channel_details&.last_read).to_f).strftime("%m/%d/%Y"), - "Channel Topic" => channel_details.topic.value, + "Channel Topic" => CGI.unescapeHTML(channel_details.topic.value), }) new_channel.create @@ -50,10 +51,10 @@ def syncopate existing_channel["Channel Name"] = channel[:name] existing_channel["Creation Date"] = Time.at(channel[:created]).strftime("%m/%d/%Y") existing_channel["Membership"] = channel[:num_members] - existing_channel["Channel Purpose"] = channel[:purpose][:value] + existing_channel["Channel Purpose"] = CGI.unescapeHTML(channel[:purpose][:value]) existing_channel["Status"] = "Archived" if channel[:is_archived] existing_channel["Last Activity"] = Time.at((channel_details&.latest&.ts || channel_details&.last_read).to_f).strftime("%m/%d/%Y") - existing_channel["Channel Topic"] = channel_details.topic.value + existing_channel["Channel Topic"] = CGI.unescapeHTML(channel_details.topic.value) existing_channel.save else