Link is stripping out %20

I am putting a link/button on a page, (https://thecrossing.com/yearend/)
The button link is set to…
https://pushpay.com/g/thecrossingcostamesa?a=0&f[0]=End%20of%20Year%20Giving

But when you click through on this button it strips out the %20 when it takes you into the browser.

If I put the link, in the browser manually it pulls the the correct page with the correct fund, but when I go through the website button it goes to… https://pushpay.com/g/thecrossingcostamesa?a=0&f[0]=EndofYearGiving

How do I stop that from happening?

Hey @bcoplin,

Thank you for reaching out to us. I tested your link in my local setup using a button element and it works fine on my end. it doesn’t strip out spaces from the link. I then checked your setup and I see you’re using an outdated version of X and Cornerstone. Please update both X and Cornerstone to the latest version first and see if this resolves the issue. You can find the latest version numbers here: (http://theme.co/changelog/) Then you can compare them to what’s installed on your site.

If you find anything to be out of date, you can review our update guide.

Let us know how this goes!

The only reason it is working right now is because i changed the spaces to underscores, but if you use spaces %20 it strips them out.

Hello @bcoplin,

Please understand that the theme itself does not modify any of the links. It is the browser or the address bar of the browser and the way it renders characters in the url is doing that.

%20 is equivalent to a space. Your link should be:
https://pushpay.com/g/thecrossingcostamesa?a=0&f[0]=End of Year Giving

Your issue is more about URL encoding which is not related to the theme. You can check that out by switching to Twenty Seventeen theme and still experience the same. Perhaps, you will need to check out this links to understand URL encoding:
https://www.quora.com/What-is-does-20-and-30-mean-in-URL

I would highly recommend that instead of having space character, you use dash - or underscore _ in your urls to avoid any issues with URL encoding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.