An error occurs when I try to redirect the sending of the web form to an external web page with a query string

Dear Drupal community,

I created a web form using the web forms module in Drupal 8 to add information to a web page. Since I do not want to update the web page manually, I would like to automate this process by redirecting the information entered in the web form to a cgi script that then takes care of the rest (the destination web page is not based on drupal). So I used the [webform_submission:values:<>] tokens and added them in the query string of the external url. In principle, it works, but I realized that for some fields in the web form you can enter spaces and special characters such as "and". In these cases, an error message appears indicating that the confirmation URL is not valid. I attached a .png. The blue line that sees a space seems to be the cause of the problem. But if I enter the URL manually in the browser, my cgi script works as expected. Therefore, I just need to prevent Drupal from stopping the redirect.

I appreciate any help.


P.S. I created the same publication in the forum. Although strangely, I do not see my post appear in the forum.

pps While the approach with the query string is probably an insecure approach, it is fine for my purpose since everything happens in an internal area protected by a password.

enter the description of the image here