Action button to open URL not url-encoding the ampersand in the accounts.name field

I have an Action Button defined in my Accounts module that queries my license system by Account Name.

concat("https://<myLicenseSystem>/NLU?input=", $name, " licenses")

However when I have a name like "Texas A&M" the ampersand is not URL encoded and leads to an error.

The URL it takes me to is: 

https://<myLicenseSystem>/NLU?input=Texas%20A&M%20University%20licenses

instead of:

https://<myLicenseSystem>/NLU?input=Texas%20A%26M%20University%20licenses

How do I get the Action button to url encode the ampersand?

Thanks,

FrancescaS