Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search query var gets re-slashed in rebooted query #88

Open
dlh01 opened this issue Jun 14, 2020 · 0 comments
Open

Search query var gets re-slashed in rebooted query #88

dlh01 opened this issue Jun 14, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@dlh01
Copy link
Member

dlh01 commented Jun 14, 2020

WP_Query calls stripslashes() on the s query var when parsing searches: https://github.com/WordPress/wordpress-develop/blob/eb06a59f536692e9499b89abd3f156ff56d3075e/src/wp-includes/class-wp-query.php#L1338-L1341

ES_WP_Query mimics this behavior in \ES_WP_Query_Wrapper::parse_search(), but \ES_WP_Query_Shoehorn::reboot_query_vars() puts the original s back into the query, causing the slashed string to be returned in get_search_query() and functions relying on it like wp_get_document_title().

@dlh01 dlh01 added the bug Something isn't working label Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant