Skip to content

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

@dlh01

Description

@dlh01

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions