SC 9.7 - single quotes break refined search new options


This can be easily verified using the SC online sample:

https://examples.scriptcase.com.br/exemplos/grid_refined_search_v97/?nmgp_opcao=force_lang&nmgp_idioma=en_us

  • Apply a refined search having a single quote in the search text: e.g. Supplier \ Grandma Kelly’s Homestead

  • The filter will be applied and, as per the new option, there will be a “Supplier Grandma Kelly’s Homestead X” tag visible just below the grid toolbar.

  • Now click on the X button inside the tag and… nothing happens.

The X close button is supposed to remove the filter. When used with text without single quotes, the X close button inside the tag works.

The issue seems to be that the text won’t be used only inside a span element to show it in the page, but also in the onclick event of the img used as tag, where it’s delimited by two single quotes ‘…’ thus breaking the code:

onclick="nm_proc_int_search(.... , '3##@@Grandma Kelly's Homestead', .....)

Just escaping the single quote with a “\” will make the code work:

onclick="nm_proc_int_search(.... , '3##@@Grandma Kelly\'s Homestead', .....)