Problem/Motivation

Follow up from #3371662: Error: Could not parse host using Standard Connector we should trim spaces around URLs to avoid exceptions being thrown by the OpenSearch lib.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3371727-2.patch896 bytessidharth_soman
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kim.pepper created an issue. See original summary.

sidharth_soman’s picture

Status: Active » Needs review
StatusFileSize
new896 bytes

Hi, I've made the required change in the 'url' property of the configForm in StandardConnector.php. Please test and review this patch.

kim.pepper’s picture

@sidharth_soman thanks for your patch. This will only affect the default value that is set in the form.

We want to trim the value entered by the user, before it gets saved.

Robinson Galvez made their first commit to this issue’s fork.

keshav.k made their first commit to this issue’s fork.

keshavv’s picture

Thank you For the #2 patch. But I think #2 Patch is not needed as rtrim() is already there in the submit handler. It will trim the URL while submitting the form.
I have created an MR and changed rtrim() to trim() So that it will remove whitespace from both sides.
Please review the MR.
Thank you.

mariamk’s picture

Tested the patch and it worked. I suggest another reviewer confirm since I'm still new.

kim.pepper’s picture

Status: Needs review » Needs work

sourabhjain made their first commit to this issue’s fork.

sourabhjain’s picture

Status: Needs work » Needs review
kim.pepper’s picture

Status: Needs review » Fixed

Merged to 2.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.