If you build a table with a multiple select filter and one of the options has parentheses, if you select the option with the parentheses it will never show in the table
I have tracked it down to buildSearchStringForMultiFilters, where the search value is escaped only with
value.replace(/+/g, '\+')
instead of a proper regex escape, so all options with .[]()*? will have similar issues
The value needs to be properly escaped with a function which is already available in the same file (and could be changed to)
var escapeRegex = function(a) { return a.replace(RegExp("([/.*+?|()\\[\\]{}\\\\$^\\-])", "g"), "\\$1")
};
The simple select also has the same issue but coming from
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
To be completely honest, this will be a query best handled by our developers - it goes a bit above my level of expertise.
I will pass all the details to them - and they will advise.
As soon as they provide input - i will report back immediately. Thank you for your patience.
My apologies, i shouldn't have sent you the fix, since you obviously already made a workaround fix yourself, sorry about that.
I have certainly passed everything to our developers;
they will have to do a lot of testing, before implementing a fix to make modifications per your suggestion;
but this will certainly help them to improve the plugin.
At this moment, you can either work with server-side tables, where this bug does not happen;
or you can keep using your solution until the devs implement a fix.
We thank you very much for pointing this out, and for sharing your code modification with us.
-
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
once they test everything and implement a fix - it will be stated there;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
I had a look at the fix you sent and it looks good except line 198, which is missing the regex escape as well
search = serverSide ? value : "^" + value + "$";
And the buildSearchStringForMultiFilters which is still escaping the + char (which has already been escaped) leading to a double escape and now the issue will be present when filtering with an option with a '+'
Hello,
If you build a table with a multiple select filter and one of the options has parentheses, if you select the option with the parentheses it will never show in the table
I have tracked it down to buildSearchStringForMultiFilters, where the search value is escaped only with
instead of a proper regex escape, so all options with .[]()*? will have similar issues
The value needs to be properly escaped with a function which is already available in the same file (and could be changed to)
The simple select also has the same issue but coming from
Which should have the second param of search (bRegex) false instead of true
Hi, Adrien
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
To be completely honest, this will be a query best handled by our developers - it goes a bit above my level of expertise.
I will pass all the details to them - and they will advise.
As soon as they provide input - i will report back immediately. Thank you for your patience.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi, Adrien
My apologies, i shouldn't have sent you the fix, since you obviously already made a workaround fix yourself, sorry about that.
I have certainly passed everything to our developers;
they will have to do a lot of testing, before implementing a fix to make modifications per your suggestion;
but this will certainly help them to improve the plugin.
At this moment, you can either work with server-side tables, where this bug does not happen;
or you can keep using your solution until the devs implement a fix.
We thank you very much for pointing this out, and for sharing your code modification with us.
-
You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;
once they test everything and implement a fix - it will be stated there;
and our newsletter, so you're informed about new features, bug fixes, freebies, etc.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Thanks for the quick fix and response
I had a look at the fix you sent and it looks good except line 198, which is missing the regex escape as well
And the buildSearchStringForMultiFilters which is still escaping the + char (which has already been escaped) leading to a double escape and now the issue will be present when filtering with an option with a '+'
Hi, Adrien
Thank you very much for this updated detail; and for pointing it out for us-
i have passed it to our developers once again - our lead developer will take a closer look and he will review everything.
As soon as he advises, i will report back.
Thank you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables
Hi, Adrien
I 've been advised.
Our developers are aware of these details. This fix that you created works best for your use-case;
but they have to take into consideration a lot of other factors and other use-cases, such as predefined filter values, foreign keys, and so on;
so in order for them to create a best universal fix for everyone will take further testing and a solution for all use-cases.
Of course, they will keep doing their best to find the correct fix as soon as possible.
Thank you once again for sharing your fix - it will save them valuable time during testing, and working out the best solution.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables