pods icon indicating copy to clipboard operation
pods copied to clipboard

Search Filters for Advanced Content Types are “over escaping” in Search Form, kicking SQL errors

Open PodsBot opened this issue 9 years ago • 6 comments

Search Filters for Advanced Content Types are “over escaping” in Search Form, kicking SQL errors submitted via Slack by jimtrue

In reference see forum post http://pods.io/forums/topic/single-quote-in-advanced-filters-gives-sql-error/

Was able to replicate locally. Created a single ACT, default fields and added Search Filters for 'Name' the first field under Admin UI.

Typing any search with an apostrophe results in SQL like this: SELECT DISTINCTt.* FROMwp_pods_congregationAStWHERE (t.nameLIKE '%abbot\\\\\\'s%' ORt.permalinkLIKE '%abbot\\\\\\'s%' ) ORDER BYt.name,t.idLIMIT 0, 25

That's over-escaping the like clause.

PodsBot avatar May 13 '15 20:05 PodsBot

This was introduced here: https://github.com/pods-framework/pods/commit/523af9

pglewis avatar May 18 '15 07:05 pglewis

~~#2843~~

Shelob9 avatar May 18 '15 16:05 Shelob9

Sorry... why the reference to that issue with no other comment... ?

pglewis avatar May 18 '15 19:05 pglewis

~~@pglewis Sorry Should have said related/ and or dupe of #2843~~

Shelob9 avatar May 21 '15 16:05 Shelob9

This is an escaping issue from all the backslashes in the SQL, so I'm leaning toward "unrelated"

pglewis avatar May 21 '15 20:05 pglewis

We have another Support Ticket on this issue: http://pods.io/forums/topic/bug-searching-act/

jimtrue avatar Nov 23 '15 16:11 jimtrue