DataTablesSrc icon indicating copy to clipboard operation
DataTablesSrc copied to clipboard

[BUG] Filter does not work properly when entering double quotation marks (`"`)

Open radmorecameron opened this issue 3 years ago • 4 comments

ISSUE COPIED FROM https://github.com/wet-boew/wet-boew/issues/9497

Describe the bug When trying to filter using quotation marks, the table does not get properly filtered.

To Reproduce Steps to reproduce the behavior:

  1. Go to datatables.net example table
  2. Type quotation marks " into the filter textbox
  3. See error, table won't change until 4 double quotations are entered

image

Expected behavior Rows should disappear when they don't have quotation marks.

Additional information (optional)

Adding a fourth quotation mark will get it to behave as if there was one quotation mark (hard to show as none of the rows in the example here had quotation marks) image

Desktop/Smartphone (please complete the following information)

  • OS or Device: Windows 10
  • Browser: Edge
  • Version:108.0.1462.46 (Official build) (64-bit)

radmorecameron avatar Dec 14 '22 17:12 radmorecameron

Thank you for the report - agreed, there is something wrong in the handling of the quotes for an exact match string. I'll look into that for the next release.

AllanJard avatar Dec 15 '22 09:12 AllanJard

"this is a limitation of smart searching due to the use of double quotes to do an exact match. Unfortunately the only way around that is to disable the smart search." https://datatables.net/forums/discussion/26785/search-filter-with-a-double-quote-in-the-string#Comment_73006

wewhite avatar Dec 19 '22 22:12 wewhite

That is the case for a single double quote yes. But I'm not convinced that the behaviour you are seeing for four double quotes is correct. That said - it will be fairly nuanced due to the exact matching from the double quotes.

AllanJard avatar Dec 20 '22 08:12 AllanJard

A similar issue happens with comma and slash: if you put a comma or a slash in the filter textbox, data does not change. A second comma or slash is needed to see the data changing.

francescodisciascio avatar Aug 09 '23 13:08 francescodisciascio