Uploaded image for project: 'Archive of Our Own'
  1. AO3-4552

Detail of query in search results displays incorrectly when the < and > symbols are used without spaces between the symbol and number

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Invalid
    • Affects Version/s: 0.9.130
    • Fix Version/s: 0.9.197
    • Milestone:
      Internal 0.9
    • Difficulty:
      Medium
    • Roadmap:
      Search
    • Components:
      BackEnd, FrontEnd

      Description

      To test this, make any search (http://archiveofourown.org/works/search) in the numerical fields.

      For example, works with >1000 kudos and <10000 words.

      Result:

      http://archiveofourown.org/works/search?utf8=%E2%9C%93&work_search[query]=&work_search[title]=&work_search[creator]=&work_search[revised_at]=&work_search[complete]=0&work_search[single_chapter]=0&work_search[word_count]=%3C10000&work_search[language_id]=&work_search[fandom_names]=&work_search[rating_ids]=&work_search[character_names]=&work_search[relationship_names]=&work_search[freeform_names]=&work_search[hits]=&work_search[kudos_count]=%3E1000&work_search[comments_count]=&work_search[bookmarks_count]=&work_search[sort_column]=&work_search[sort_direction]=&commit=Search

      The query at the top of the results displays as " You searched for: word count: 1000 "

      This means that the "<" symbol gets eaten, and that the ">" symbol makes the whole portion of the query disappear.

      However, if you do the same search with a space between the symbols and the numbers, the query displays correctly:

      http://archiveofourown.org/works/search?utf8=%E2%9C%93&work_search[query]=&work_search[title]=&work_search[creator]=&work_search[revised_at]=&work_search[complete]=0&work_search[single_chapter]=0&work_search[word_count]=%3C+10000&work_search[language_id]=&work_search[fandom_names]=&work_search[rating_ids]=&work_search[character_names]=&work_search[relationship_names]=&work_search[freeform_names]=&work_search[hits]=&work_search[kudos_count]=%3E+1000&work_search[comments_count]=&work_search[bookmarks_count]=&work_search[sort_column]=&work_search[sort_direction]=&commit=Search

      Search query displays as: "word count: < 10000 kudos count: > 1000 "

      The search results themselves are not affected at all. This is just a problem with how the query made displays at the top of the results, which could cause confusion in users.

        Attachments

          Activity

            People

            • Assignee:
              sarken sarken
              Reporter:
              hele.br hele.br (Inactive)
            • Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: