<commit_before>module FlashMessageConductor
  module ViewHelpers
    def render_flash_message(css_class, message = "")
      return "" if message.nil? or message.blank?
      content_tag("p", message, :class => "#{css_class}")
    end

    def render_flash_messages(div_id = "flash_messages", div_class = "")
      div_content = ''.html_safe
      FLASH_MESSAGE_TYPES.each do |key|
        div_content << render_flash_message(key.to_s, flash[key]) unless flash[key].blank?
      end
      if div_content.blank?
        return ""
      else
        return content_tag('div', div_content, :id => div_id, :class => div_class)
      end
    end

    def flash_message_set?
      flash_set = false
      FLASH_MESSAGE_TYPES.each do |key|
        flash_set = true unless flash[key].blank?
      end
      return flash_set
    end
  end
end<commit_msg>Both message and div content are considered HTML safe<commit_after>module FlashMessageConductor
  module ViewHelpers
    def render_flash_message(css_class, message = "")
      return "" if message.nil? or message.blank?
      content_tag("p", message.html_safe, :class => "#{css_class}")
    end

    def render_flash_messages(div_id = "flash_messages", div_class = "")
      div_content = ''
      FLASH_MESSAGE_TYPES.each do |key|
        div_content << render_flash_message(key.to_s, flash[key]) unless flash[key].blank?
      end
      if div_content.blank?
        return ""
      else
        return content_tag('div', div_content.html_safe, :id => div_id, :class => div_class)
      end
    end

    def flash_message_set?
      flash_set = false
      FLASH_MESSAGE_TYPES.each do |key|
        flash_set = true unless flash[key].blank?
      end
      return flash_set
    end
  end
end
{'fraction_non_alphanumeric': 0.09712643678160919, 'fraction_numerical': 0.0, 'mean_word_length': 2.903587443946188, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '2129313', 'n_tokens_mistral': 544, 'n_tokens_neox': 544, 'n_words': 130}