pods
pods copied to clipboard
Search Filters for Advanced Content Types are “over escaping” in Search Form, kicking SQL errors
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 DISTINCT
t.* FROM
wp_pods_congregationAS
tWHERE (
t.
nameLIKE '%abbot\\\\\\'s%' OR
t.
permalinkLIKE '%abbot\\\\\\'s%' ) ORDER BY
t.
name,
t.
idLIMIT 0, 25
That's over-escaping the like clause.
This was introduced here: https://github.com/pods-framework/pods/commit/523af9
~~#2843~~
Sorry... why the reference to that issue with no other comment... ?
~~@pglewis Sorry Should have said related/ and or dupe of #2843~~
This is an escaping issue from all the backslashes in the SQL, so I'm leaning toward "unrelated"
We have another Support Ticket on this issue: http://pods.io/forums/topic/bug-searching-act/