ebsco / edsapi-drupal-plugin

A Drupal modules for the EBSCO Discovery Services API
Apache License 2.0
1 stars 3 forks source link

Escaping of Search Term in Drupal EDS API Module, causes search terms to show up escaped in Top Search Term Report in EAdmin #45

Closed cwolfebsco closed 2 years ago

cwolfebsco commented 3 years ago

Within Drupal EDS API Module search terms are escaped as per directive on Line 4752 of EBSCOAPI.php

https://github.com/ebsco/edsapi-drupal8-plugin/blob/dd3d4d187f6ddcb0e5b9541992563ab3b0d602de/lib/EBSCOAPI.php#L452

This seems to lead to escaped search terms in EBSCOAdmin.

Screenshot 2021-01-07 at 07 59 57

Could we please review if this escaping is still needed and take appropriate action. Many thanks

kelsonthony commented 3 years ago

Hello Claus

Long time we do not talk. Honestly, my apologies, I worked a lot on the Drupal project and for some reason I thought I had already answered that question.

Are you using the latest version of Drupal 8? We've created a new release these past few weeks. Perhaps you may be using an older version. My EDS test profile is connected to the API credentials a little over a year ago and in my reports I don't see this type of issue. See my print below.

image

cwolfebsco commented 3 years ago

Many thanks for your response. Would you mind to try and add searches that make use of brackets, e.g. search for

(acrylates) (gold or silver or bronze)

The highlighted line will only escape searches that contain round brackets, commas and colons, so while I appreciate your assessment, I would be very grateful, if you could expand he testing a little bit.

To answer your questions:

this happens in a Stacks Search Pool API integration, which I believe to be based on Drupal 8 at this time.

The developer offered to simply comment out the line, but I feared that we might cause ourselves some other troubles down the line, as you certainly had had good reasons for this str_replace function.

Many thanks indeed!

kelsonthony commented 3 years ago

Hello @cwolfebsco How you going. I'm made some this with a specific cusomer with bracktes and booleans and it's working fine. I'm send the reports by email to you.