Escape some chars in search parameters
This is related to this post.
Is a common problem with ZTCTextIndex and this pr will try to fix the problem with searches made with plone.restapi only.
The regexp right now only remove parenthesis from the value. Do we need to manage also other characters?
@cekk thanks for creating this Pull Request and help improve Plone!
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass.
Whenever you feel that the pull request is ready to be tested, either start all jenkins jobs pull requests by yourself, or simply add a comment in this pull request stating:
@jenkins-plone-org please run jobs
With this simple comment all the jobs will be started automatically.
Happy hacking!
@jenkins-plone-org please run jobs
@cekk LGTM. I am just wondering what other characters we would have to strip that would break zcatalog. Would it be possible to write a set of unit tests to just try what works and what not?
@jenkins-plone-org please run jobs
@tisto i improved tests but i've found some other edge cases that generate exceptions and i don't know if we want to handle or not:
- not (already fixed in my pr and tested)
- single chars £ $ * &, etc: ZCTextIndex returns an error if you set SearchableText with one of the special characters
@jenkins-plone-org please run jobs
@jenkins-plone-org please run jobs
@tisto @tiberiuichim any chance to have this pr merged?
I think this is no longer needed since https://github.com/plone/plone.app.querystring/issues/111 was fixed in plone.app.querystring