diff --git a/app/views/notes/rss.rss.builder b/app/views/notes/rss.rss.builder index 8fdaabe80a..9174fe4a33 100644 --- a/app/views/notes/rss.rss.builder +++ b/app/views/notes/rss.rss.builder @@ -2,8 +2,8 @@ xml.rss :version => '2.0', 'xmlns:atom' => 'http://www.w3.org/2005/Atom' do xml.channel do xml.title "Recent research notes on PublicLab.org" xml.description "Open source environmental science research at Public Lab" - xml.link "https://#{ request.host }/feed.rss" - xml.tag! 'atom:link', :rel => 'self', :type => 'application/rss+xml', :href => "https://#{ request.host }/feed.rss" + xml.link "https://#{request.host}/feed.rss" + xml.tag! 'atom:link', rel: 'self', type: 'application/rss+xml', href: "https://#{request.host}/feed.rss" @notes.each do |node| author = node.author.username @@ -17,13 +17,13 @@ xml.rss :version => '2.0', 'xmlns:atom' => 'http://www.w3.org/2005/Atom' do xml.pubDate node.created_at.to_s(:rfc822) xml.link "https://" + request.host.to_s + node.path body = auto_link(body, sanitize: false) - body = "

Approve or Spam

" + body if node.status == 4 + body = "

Approve or Spam

" + body if node.status == 4 if node.main_image - xml.description { xml.cdata!("#{node.main_image.title}
" + body) } + xml.description { xml.cdata!("#{node.main_image.title}
" + body) } else xml.description { xml.cdata!("PublicLab
" + body) } end - xml.guid url_for :only_path => false, :controller => 'notes', :action => 'show', :id => node.nid + xml.guid url_for only_path: false, controller: 'notes', action: 'show', id: node.nid end end end diff --git a/app/views/subscription_mailer/notify_node_creation.html.erb b/app/views/subscription_mailer/notify_node_creation.html.erb index 30986792a9..e10958fe68 100644 --- a/app/views/subscription_mailer/notify_node_creation.html.erb +++ b/app/views/subscription_mailer/notify_node_creation.html.erb @@ -8,11 +8,11 @@
-<% if @node.main_image %><% end %> +<% if @node.main_image %><% end %> -<%= raw auto_link(@node.latest.render_body_email(ActionMailer::Base.default_url_options[:host]), :sanitize => false) %> +<%= raw auto_link(@node.latest.render_body_email(ActionMailer::Base.default_url_options[:host]), sanitize: false) %> -
+
diff --git a/app/views/tag/rss.rss.builder b/app/views/tag/rss.rss.builder index 04b1246038..2ab9455b5f 100644 --- a/app/views/tag/rss.rss.builder +++ b/app/views/tag/rss.rss.builder @@ -25,11 +25,11 @@ xml.rss :version => '2.0', 'xmlns:atom' => 'http://www.w3.org/2005/Atom' do end xml.link "https://" + request.host.to_s + node.path if node.main_image - xml.description { xml.cdata!("#{node.main_image.title}

#{auto_link(node.latest.render_body, :sanitize => false)}

") } + xml.description { xml.cdata!("#{node.main_image.title}

#{auto_link(node.latest.render_body, sanitize: false)}

") } else - xml.description { xml.cdata!("PublicLab

#{auto_link(node.latest.render_body, :sanitize => false)}

") } + xml.description { xml.cdata!("PublicLab

#{auto_link(node.latest.render_body, sanitize: false)}

") } end - xml.guid url_for :only_path => false, :controller => 'notes', :action => 'show', :id => node.nid + xml.guid url_for only_path: false, controller: 'notes', action: 'show', id: node.nid end end end diff --git a/app/views/tag/rss_for_tagged_with_author.rss.builder b/app/views/tag/rss_for_tagged_with_author.rss.builder index 989217467d..b734296f2c 100644 --- a/app/views/tag/rss_for_tagged_with_author.rss.builder +++ b/app/views/tag/rss_for_tagged_with_author.rss.builder @@ -25,11 +25,11 @@ xml.rss :version => '2.0', 'xmlns:atom' => 'http://www.w3.org/2005/Atom' do end xml.link "https://" + request.host.to_s + node.path if node.main_image - xml.description { xml.cdata!("#{node.main_image.title}

#{auto_link(node.latest.render_body, :sanitize => false)}

") } + xml.description { xml.cdata!("#{node.main_image.title}

#{auto_link(node.latest.render_body, sanitize: false)}

") } else - xml.description { xml.cdata!("PublicLab

#{auto_link(node.latest.render_body, :sanitize => false)}

") } + xml.description { xml.cdata!("PublicLab

#{auto_link(node.latest.render_body, sanitize: false)}

") } end - xml.guid url_for :only_path => false, :controller => 'notes', :action => 'show', :id => node.nid + xml.guid url_for only_path: false, controller: 'notes', action: 'show', id: node.nid end end end diff --git a/app/views/users/rss.rss.builder b/app/views/users/rss.rss.builder index afdff3efee..53e5cff315 100644 --- a/app/views/users/rss.rss.builder +++ b/app/views/users/rss.rss.builder @@ -10,17 +10,15 @@ xml.rss :version => "2.0" do newline = ' ' body = node.body - body = "
"+newline+node.body if node.main_image + body = "
"+newline+node.body if node.main_image xml.item do xml.title node.title xml.author node.author.name xml.pubDate node.created_at.to_s(:rfc822) - #xml.link url_for :only_path => false, :controller => 'notes', :action => 'show', :id => node.nid xml.link "https://" + request.host.to_s + node.path - #xml.image "http://publiclaboratory.org/"+node.main_image.path(:default) if node.main_image - xml.description auto_link(node.latest.render_body, :sanitize => false) - xml.guid url_for :only_path => false, :controller => 'notes', :action => 'show', :id => node.nid + xml.description auto_link(node.latest.render_body, sanitize: false) + xml.guid url_for only_path: false, controller: 'notes', action: 'show', id: node.nid end end end