Duplicates facet does not escape its column name, resulting in an invalid GREL expression #4233
Labels
facets
Behaviour or rendering of facets in a project
Good First Issue
Indicates issues suitable for newcomers to design or coding, providing a gentle introduction.
Module: Frontend
These issues involve working on HTML, CSS, and JavaScript code that affects the user interface.
Type: Bug
Issues related to software defects or unexpected behavior, which require resolution.
Milestone
The code that generates the GREL expression for the Duplicates facet does not escape the name of the selected column.
If this name contains a single quote character, this results in an invalid GREL expression, hence the facet cannot be used as such.
To Reproduce
Steps to reproduce the behavior:
Current Results
The facet's GREL expression is invalid:
facetCount(value, 'value', 'Jane's column') > 1
.Expected Behavior
The GREL expression should be valid, for instance
facetCount(value, 'value', 'Jane\'s column') > 1
would work.Versions
Additional context
Brought up on our mailing list: https://groups.google.com/g/openrefine/c/2ic5F0YGcbk
The text was updated successfully, but these errors were encountered: