Trimming Trailing Whitespace from user input

I have a form with user input fields for a manufacturer name and a product name that become a part of the URL

www.foo.bar/manufacturer_name/product_name/

Browsers will trim the trailing whitespace from manually entered urls but will encode them if they are not trailing.

If the user inputs:

manufacturer_name: WaynespaceEnterprisesspace

product_name: UtilityspaceBeltspace

The resulting URL in the browser would not be what the user inputted:

www.foo.bar/Wayne%20Enterprises%20/Utility%20Belt

This behavior from the browser seems like it would cause confusion to the user and that the application should trim trailing whitespaces from inputs on the users behalf. I worry it might cause confusion if they want the whitespace to really be there. Any input would be appreciated.

TLDR: Should I respect what the user inputted or should I clean up their input without telling them

Thanks!