[wp-trac] [WordPress Trac] #35534: AllPosts page: search cannot be performed using characters "-" and "\" (without the quotes)

WordPress Trac noreply at wordpress.org
Tue May 11 06:16:44 UTC 2021


#35534: AllPosts page: search cannot be performed using characters "-" and "\"
(without the quotes)
-------------------------------+-------------------------
 Reporter:  antonrinas         |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:  4.4.1
 Severity:  normal             |  Resolution:  worksforme
 Keywords:                     |     Focuses:
-------------------------------+-------------------------
Changes (by markparnell):

 * status:  new => closed
 * resolution:   => worksforme


Comment:

 I've just tested this on 5.7.1 and a search on `\` now works. Search
 queries which contain `-` also work (e.g. searching for a hyphenated
 word), though just `-` on its own does not. It appears that this is
 because a search query that starts with `-` is treated as a negative query
 - i.e. find all posts that '''don't''' contain the subsequent string.

 As such I don't believe any action is required here.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/35534#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list