Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#11374 closed defect (bug) (fixed)

the_search_query() removes backslashes

Reported by: TobiasBg Owned by:
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.7
Component: General Keywords:
Focuses: Cc:


Local test installations of WP 2.7, 2.8 and trunk (all with default theme, no plugins) do this:

On the frontend, search for something like AC\DC (I know that in their name it is a /, but anyway.)

The search seems to perform correctly (at least there are double backslashes
in the SQL WHERE clause), but on the result page, the search term became ACDC (without backslash) in the search form field and right below it.

It should still be AC\DC though (so that I don't have to add it again, if I want for example modify my search query).

Change History (1)

#1 @markjaquith
6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12356]) Do not double-stripslashes() on get_search_query(). fixes #11374

Note: See TracTickets for help on using tickets.