Work groups with quotation marks, & or < in their name in their name break the suggest functionality

Description

Steps to reproduce for ":

  • create a work group named the "gold" team (note the quotation marks)

  • navigate to "browse patients"

  • type "go" in the owner filter

Expected result: the "gold" team appears as a suggestion.

Steps to reproduce for <:

  • create a work group named the silver <3 team

  • navigate to "browse patients"

  • type "si" in the owner filter

Expected result: the silver <3 team appears as a suggestion.

Actual result: no suggestions appear and the suggest widget looks stuck. The actual response in of the suggest request looks like this:

1 2 3 4 5 6 7 8 <results> <parsererror style=" display: block; white-space: pre; border: 2px solid #c77; padding: 0 1em 0 1em; margin: 1em; background-color: #fdd; color: black"> <h3>This page contains the following errors:</h3> <div style="font-family:monospace;font-size:12px">error on line 1 at column 23: attributes construct error</div> <h3>Below is a rendering of the page up to the first error.</h3> </parsererror> </results>

Steps to reproduce for &:

  • create user Peter Brown

  • create a workgroup "Mary&Peter"

  • navigate to "Browse patients" and type "p" in the "owner" filter

Expected results: suggestions "Peter Brown" and "Mary&Peter" should appear

Actual results: no suggestions are visible. If "b" is typed instead, "Peter Brown" correctly appears as a suggestion.

Environment

None

Status

Assignee

Veronika Koltunova

Reporter

Marta Girdea

Labels

None

External issue ID

None

External issue ID

None

Fix versions

Affects versions

1.4

Priority

Medium