<commit_before>cache(["#{date_slug}/tags/show/upcoming/atom", @tag], :tag => 'session-info') do
  atom_feed(:root_url => tag_url(@tag)) do |feed|
    feed.title(t(:'.atom_title_prefix') + @page_title)
    updated = @topics.max { |a, b| a.upcoming_sessions[0].updated_at <=> b.upcoming_sessions[0].updated_at } rescue nil
    feed.updated(updated ? updated.upcoming_sessions[0].updated_at : Time.now)

    @topics = Topic.upcoming_tagged_with(@tag)
    if @topics.size > 0
      @topics.each do |topic|
        cache(["#{date_slug}/tags/show/upcoming/atom", topic], :tag => topic.cache_key) do
          next unless topic.upcoming_sessions.present?
          published = topic.upcoming_sessions.max { |a, b| a.updated_at <=> b.updated_at } rescue nil
          feed.entry(topic, :published => published.updated_at) do |entry|
            entry.title(topic.name)
            
            summary = []
            
            topic.upcoming_sessions.first(2).each do |session|
              summary << link_to(session_info(session), session_url(session, :only_path => false))
            
              # FIXME: add topic description, instructor, location, etc
              #entry.content(session_info(session))
            end
            
            more = topic.upcoming_sessions.size - 2
            summary << link_to("#{more} more upcoming sessions", topic_url(topic, :only_path => false)) if more > 0
            
            entry.summary(summary.join("<br/>\n"))

          end
        end
      end
    else
      # FIXME: should we display anything when there are no upcoming sessions?
    end
  end
end<commit_msg>Specify html type for summary field in Atom feed for Tags. #6200<commit_after>cache(["#{date_slug}/tags/show/upcoming/atom", @tag], :tag => 'session-info') do
  atom_feed(:root_url => tag_url(@tag)) do |feed|
    feed.title(t(:'.atom_title_prefix') + @page_title)
    updated = @topics.max { |a, b| a.upcoming_sessions[0].updated_at <=> b.upcoming_sessions[0].updated_at } rescue nil
    feed.updated(updated ? updated.upcoming_sessions[0].updated_at : Time.now)

    @topics = Topic.upcoming_tagged_with(@tag)
    if @topics.size > 0
      @topics.each do |topic|
        cache(["#{date_slug}/tags/show/upcoming/atom", topic], :tag => topic.cache_key) do
          next unless topic.upcoming_sessions.present?
          published = topic.upcoming_sessions.max { |a, b| a.updated_at <=> b.updated_at } rescue nil
          feed.entry(topic, :published => published.updated_at) do |entry|
            entry.title(topic.name)
            
            summary = []
            
            topic.upcoming_sessions.first(2).each do |session|
              summary << link_to(session_info(session), session_url(session, :only_path => false))
            
              # FIXME: add topic description, instructor, location, etc
              #entry.content(session_info(session))
            end
            
            more = topic.upcoming_sessions.size - 2
            summary << link_to("#{more} more upcoming sessions", topic_url(topic, :only_path => false)) if more > 0
            
            entry.summary(summary.join("<br/>\n"), :type => 'html')

          end
        end
      end
    else
      # FIXME: should we display anything when there are no upcoming sessions?
    end
  end
end
{'fraction_non_alphanumeric': 0.12710843373493977, 'fraction_numerical': 0.005421686746987952, 'mean_word_length': 2.445020746887967, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 26, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3606110', 'n_tokens_mistral': 1014, 'n_tokens_neox': 1011, 'n_words': 218}