uclibs / scholar_uc_legacy

Source code for Scholar@UC up to version 3.x. Replaced by ucrate
Other
5 stars 1 forks source link

Department Names with ampersands breaking facet search #1926

Closed newmanld closed 6 years ago

newmanld commented 6 years ago

Descriptive summary

On a work show page, Department names are a faceted search. Department names that include an ampersand are failing.

Expected behavior

The search should retrieve all works with the same Department.

Actual behavior

No works are found.

Steps to reproduce the behavior

  1. Go to this work: https://scholar.uc.edu/show/bc386p00p
  2. Click, beside Department, on Digital Collections & Repositories

No results will be found. Department links, on work show pages, with other Departments with an ampersand in the name, which are similarly failing. Department links on work show pages, without an ampersand in the department name, do not fail.

The faceted browse works (from the Catalog, selecting the College, then the Department).

hortongn commented 6 years ago

In Linda's example above, the link that is currently generated for Department is https://scholar.uc.edu/catalog?f%5Bdepartment_sim%5D%5B%5D=Digital+Collections+%26amp%3B+Repositories

The way it should be for Solr to properly find works with that department is https://scholar.uc.edu/catalog?f%5Bdepartment_sim%5D%5B%5D=Digital+Collections+%26+Repositories

So when ampersands are used, they should be encoded as %26 instead of %26amp%3B