Closed wluo closed 10 years ago
:cactus: :dash:
Please confirm if WP has any conditionals that would affect the escaping.
Please add a reference to where in WP the escaping is being added. A link to the file in core Trac and the name of the method would be great.
sure thing. i was looking in wp-include/query.php's get_posts() function, where it calls parse_search() if a keyword search is specified. parse_search() calls stripslashes() on the search keywords which's why we didn't have to call it again in go-sphinx. it also urldecodes() the search string if it came from a POST, and strips newlines and carriage returns. and while this doesn't apply to us, WP then calls like_escape() and sql_sql() on each search term parsed out of the query string.
:pickles:
extra slashes are already removed by WP by the time we get the query string
see https://github.com/GigaOM/legacy-pro/issues/2794