Cannot click drop-down answer values with apostrophe in Information Extraction
The steps below describe the circumstances how the issue occurs:
When designing a Manual Task, create a Select One answer where the value includes an apostrophe.
Add a sub-answer with the
expand:on()CSS rule.Run the task and open its preview.
Try to select the value with an apostrophe. It is impossible to select the value. In the console, you see the following error:
jquery.min.js:2 Uncaught Error: Syntax error, unrecognized expression: :regex(class, expand:on\(value'1\))
at Function.nt.error (VM1427 jquery.min.js:2)
at ut (VM1427 jquery.min.js:2)
at vt (VM1427 jquery.min.js:2)
at Function.nt [as find] (VM1427 jquery.min.js:2)
at init.find (VM1427 jquery.min.js:2)
at HTMLOptionElement.<anonymous> (<anonymous>:255:71)
at Function.each (VM1427 jquery.min.js:2)
at init.each (VM1427 jquery.min.js:2)
at expandCollapseNested (<anonymous>:252:35)
at HTMLSelectElement.<anonymous> (<anonymous>:265:54)
Cause
You cannot click a drop-down answer value with an apostrophe if it is a parent answer with the expand:on functionality.
Resolution
To resolve the issue, follow the instruction below:
In Control Tower, go to Advanced > Templates.
Find and open the
html.ftlfile.Find the function and replace it with the following:
function escapeRegExp(str) {
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|\']/g, "\\$&");
}