plone / Products.CMFPlone

The core of the Plone content management system
https://plone.org
GNU General Public License v2.0
255 stars 191 forks source link

Catalog search does not handle correctly parenthesis inside quotes #3879

Closed erral closed 11 months ago

erral commented 11 months ago

BUG/PROBLEM REPORT (OR OTHER COMMON ISSUE)

What I did:

What I expect to happen:

What actually happened:

What version of Plone/ Addons I am using:

mauritsvanrees commented 11 months ago

Let me check. I have created a Plone 6.0 site with two pages, one with title "Hello World Plain" and one with "Hello (World) Parentheses". In the SearchableText and Title indexes, the parentheses are stripped away, so they only have ['hello', 'world', 'parentheses'] or similar.

Now I try it with your branch. There is no change, except in the last one, where munge_search_term correctly gives "hello (world)", and we find both pages.

So looks good to me. Thanks! Same for your plone.app.querystring PR.

I wonder if we could instead simply add the parentheses to BAD_CHARS, as they are ignored anyway, but they are not exactly "bad" characters, just a bit annoying. ;-). So let's leave that as it is.