<commit_before><% title "Search" %>

<%= form_tag (params[:option] == 'graphs' ? search_path(anchor: "graphs") : search_path), method: "get" do |f| %>
  <div class="form-group">
    <%= label_tag :title %>
    <% if user_signed_in? %>
      <%= check_box_tag :title_is_regex, 1, params[:title_is_regex] %> <span class="text-muted">regex</span>
      <%= check_box_tag :title_is_inverse_regex, 1, params[:title_is_inverse_regex] %> <span class="text-muted">invert</span>
    <% end %>
    <%= text_field_tag :title, params[:title], placeholder: "*", class: "form-control" %>
  </div>
  <div class="form-group">
    <%= label_tag :body %>
    <%= text_field_tag :body, params[:body], placeholder: "*", class: "form-control" %>
  </div>
  <div class="form-group">
    <%= label_tag :username %>
    <%= text_field_tag :username, params[:username], placeholder: "*", class: "form-control" %>
  </div>
  <div class="form-group">
    <%= label_tag :why %>
    <%= text_field_tag :why, params[:why], placeholder: "*", class: "form-control" %>
  </div>
  <div class="form-group">
    <%= label_tag :site %>
    <%= select_tag :site, options_for_select(Site.select(:site_name, :id).all.order(:site_name).map {|s| [s.site_name, s.id] }, params[:site]), class: "form-control", include_blank: "All" %>
  </div>

  <div class="form-group">
    <%= label_tag :feedback %><commit_msg>Encode site names correctly on search<commit_after><% title "Search" %>

<%= form_tag (params[:option] == 'graphs' ? search_path(anchor: "graphs") : search_path), method: "get" do |f| %>
  <div class="form-group">
    <%= label_tag :title %>
    <% if user_signed_in? %>
      <%= check_box_tag :title_is_regex, 1, params[:title_is_regex] %> <span class="text-muted">regex</span>
      <%= check_box_tag :title_is_inverse_regex, 1, params[:title_is_inverse_regex] %> <span class="text-muted">invert</span>
    <% end %>
    <%= text_field_tag :title, params[:title], placeholder: "*", class: "form-control" %>
  </div>
  <div class="form-group">
    <%= label_tag :body %>
    <%= text_field_tag :body, params[:body], placeholder: "*", class: "form-control" %>
  </div>
  <div class="form-group">
    <%= label_tag :username %>
    <%= text_field_tag :username, params[:username], placeholder: "*", class: "form-control" %>
  </div>
  <div class="form-group">
    <%= label_tag :why %>
    <%= text_field_tag :why, params[:why], placeholder: "*", class: "form-control" %>
  </div>
  <div class="form-group">
    <% h = HTMLEntities.new %>
    <%= label_tag :site %>
    <%= select_tag :site, options_for_select(Site.select(:site_name, :id).all.order(:site_name).map {|s| [h.decode(s.site_name), s.id] }, params[:site]), class: "form-control", include_blank: "All" %>
  </div>

  <div class="form-group">
    <%= label_tag :feedback %>
{'fraction_non_alphanumeric': 0.213699607563325, 'fraction_numerical': 0.0014270424545130217, 'mean_word_length': 4.487279843444227, 'pattern_counts': {'":': 0, '<': 68, '<?xml version=': 0, '>': 68, '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': '3495391', 'n_tokens_mistral': 1073, 'n_tokens_neox': 990, 'n_words': 193}