<commit_before>class ContentFormatter
  
  def self.format!(content, entry = nil)
    whitelist = HTML::Pipeline::SanitizationFilter::WHITELIST.clone
    transformers = [iframe_whitelist] + whitelist[:transformers]
    whitelist[:transformers] = transformers
    
    context = {
      whitelist: whitelist
    }
    filters = [HTML::Pipeline::SanitizationFilter]
    
    if ENV['CAMO_HOST'] && ENV['CAMO_KEY']
      context[:asset_proxy] = ENV['CAMO_HOST']
      context[:asset_proxy_secret_key] = ENV['CAMO_KEY']
      filters = filters << HTML::Pipeline::CamoFilter
    end
    
    if entry
      filters.unshift(HTML::Pipeline::AbsoluteSourceFilter)
      filters.unshift(HTML::Pipeline::AbsoluteHrefFilter)
      context[:image_base_url] = context[:href_base_url] = entry.feed.site_url
      context[:image_subpage_url] = context[:href_subpage_url] = entry.url<commit_msg>Turn off camo.<commit_after>class ContentFormatter
  
  def self.format!(content, entry = nil)
    whitelist = HTML::Pipeline::SanitizationFilter::WHITELIST.clone
    transformers = [iframe_whitelist] + whitelist[:transformers]
    whitelist[:transformers] = transformers
    
    context = {
      whitelist: whitelist
    }
    filters = [HTML::Pipeline::SanitizationFilter]
    
    if entry
      filters.unshift(HTML::Pipeline::AbsoluteSourceFilter)
      filters.unshift(HTML::Pipeline::AbsoluteHrefFilter)
      context[:image_base_url] = context[:href_base_url] = entry.feed.site_url
      context[:image_subpage_url] = context[:href_subpage_url] = entry.url
{'fraction_non_alphanumeric': 0.11521035598705502, 'fraction_numerical': 0.0, 'mean_word_length': 4.312714776632302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '1531976', 'n_tokens_mistral': 484, 'n_tokens_neox': 477, 'n_words': 68}