<commit_before>%table
  %thead
    %tr
      %th.width-150
        Search
        - if @search_results
          = '- '+@search_results.total_entries.to_s+' results'
      %th
        - if @search_results
          = render partial: 'paginator', locals: {paginated: @search_results, path: :search_posts_path}
  %tbody
    %tr
      %td.width-300.padding-10.vtop.dark
        = form_tag search_posts_path, :method => :get do
          %table#signup
            %tr
              %td.width-70 Continuity
              %td= select_tag :board_id, options_from_collection_for_select(Board.all, :id, :name, params[:board_id]), {class: 'chosen-select', prompt: '— Choose Continuity —'}
            %tr
              %td Author
              %td= select_tag :author_id, options_from_collection_for_select(User.order('username'), :id, :username, params[:author_id]), {class: 'chosen-select', prompt: '— Choose Author —'}
            %tr
              %td Character
              %td= select_tag :character_id, options_from_collection_for_select(Character.order('name'), :id, :selector_name, params[:character_id]), {class: 'chosen-select', prompt: '— Choose Character —'}
            %tr
              %td Setting
              %td= select_tag :setting_id, options_from_collection_for_select(Setting.order('name'), :id, :name, params[:setting_id]), {class: 'chosen-select', prompt: '— Choose Setting —'}
            %tr
              %td Content
              %td= text_field_tag :subj_content, params[:subj_content], style: 'width: 100%; margin: 5px 0px; box-sizing: border-box;'
            %tr
              %td Completed
              %td.padding-5
                = check_box_tag :completed, true, params[:completed].present?, {class: 'vmid no-margin', style: 'margin-bottom: 3px;'}
                = label_tag :completed, "Completed Only"
            %tr
              %td.centered{colspan: 2}= submit_tag "Search", class: 'button'
        %td.vtop
          - if @search_results.present?
            %table
              %thead
                %tr
                  %th.sub Thread
                  %th.sub Continuity
                  %th.sub Last Updated
              %tbody
                - @search_results.each do |post|
                  %tr
                    - klass = cycle('even', 'odd')
                    %td.padding-10.post-subject{class: klass}= link_to post.subject, post_path(post)
                    %td.padding-10.post-board{class: klass}= post.board.name
                    %td.padding-10.post-time{class: klass}= post.tagged_at.strftime("%b %d, %Y ") + post.tagged_at.hour.to_s + post.tagged_at.strftime(":%M %p")
                  - if @replies && @replies.has_key?(post.id)
                    %tr
                      %td.padding-5{class: klass, colspan: 3}
                        - @replies[post.id].each do |reply|
                          %li
                            = excerpt(reply.content, params[:subj_content], radius: 10) || '(exact string not found)'
                            = link_to reply_path(reply, anchor: "reply-#{reply.id}") do
                              = image_tag "/images/link.png", class: 'vmid', title: 'Permalink'

  - if @search_results && @search_results.total_pages > 1
    %tfoot
      %tr
        %th.width-150
        %th= render partial: 'paginator', locals: {paginated: @search_results, path: :search_posts_path}<commit_msg>Strip HTML tags from the search result excerpts<commit_after>%table
  %thead
    %tr
      %th.width-150
        Search
        - if @search_results
          = '- '+@search_results.total_entries.to_s+' results'
      %th
        - if @search_results
          = render partial: 'paginator', locals: {paginated: @search_results, path: :search_posts_path}
  %tbody
    %tr
      %td.width-300.padding-10.vtop.dark
        = form_tag search_posts_path, :method => :get do
          %table#signup
            %tr
              %td.width-70 Continuity
              %td= select_tag :board_id, options_from_collection_for_select(Board.all, :id, :name, params[:board_id]), {class: 'chosen-select', prompt: '— Choose Continuity —'}
            %tr
              %td Author
              %td= select_tag :author_id, options_from_collection_for_select(User.order('username'), :id, :username, params[:author_id]), {class: 'chosen-select', prompt: '— Choose Author —'}
            %tr
              %td Character
              %td= select_tag :character_id, options_from_collection_for_select(Character.order('name'), :id, :selector_name, params[:character_id]), {class: 'chosen-select', prompt: '— Choose Character —'}
            %tr
              %td Setting
              %td= select_tag :setting_id, options_from_collection_for_select(Setting.order('name'), :id, :name, params[:setting_id]), {class: 'chosen-select', prompt: '— Choose Setting —'}
            %tr
              %td Content
              %td= text_field_tag :subj_content, params[:subj_content], style: 'width: 100%; margin: 5px 0px; box-sizing: border-box;'
            %tr
              %td Completed
              %td.padding-5
                = check_box_tag :completed, true, params[:completed].present?, {class: 'vmid no-margin', style: 'margin-bottom: 3px;'}
                = label_tag :completed, "Completed Only"
            %tr
              %td.centered{colspan: 2}= submit_tag "Search", class: 'button'
        %td.vtop
          - if @search_results.present?
            %table
              %thead
                %tr
                  %th.sub Thread
                  %th.sub Continuity
                  %th.sub Last Updated
              %tbody
                - @search_results.each do |post|
                  %tr
                    - klass = cycle('even', 'odd')
                    %td.padding-10.post-subject{class: klass}= link_to post.subject, post_path(post)
                    %td.padding-10.post-board{class: klass}= post.board.name
                    %td.padding-10.post-time{class: klass}= post.tagged_at.strftime("%b %d, %Y ") + post.tagged_at.hour.to_s + post.tagged_at.strftime(":%M %p")
                  - if @replies && @replies.has_key?(post.id)
                    %tr
                      %td.padding-5{class: klass, colspan: 3}
                        - @replies[post.id].each do |reply|
                          %li
                            = excerpt(strip_tags(reply.content), params[:subj_content], radius: 10) || '(exact string not found)'
                            = link_to reply_path(reply, anchor: "reply-#{reply.id}") do
                              = image_tag "/images/link.png", class: 'vmid', title: 'Permalink'

  - if @search_results && @search_results.total_pages > 1
    %tfoot
      %tr
        %th.width-150
        %th= render partial: 'paginator', locals: {paginated: @search_results, path: :search_posts_path}
{'fraction_non_alphanumeric': 0.12931538911644236, 'fraction_numerical': 0.009362200117027502, 'mean_word_length': 1.879949452401011, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 7, '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': '2855062', 'n_tokens_mistral': 2092, 'n_tokens_neox': 2008, 'n_words': 448}