# URI scheme does not work when there is an (encoded) & character in the password

**URL:** https://community.royalapps.com/t/uri-scheme-does-not-work-when-there-is-an-encoded-character-in-the-password/1728
**Category:** Royal TSX (for macOS)
**Created:** [February 9, 2023, 3:10pm UTC](https://community.royalapps.com/t/uri-scheme-does-not-work-when-there-is-an-encoded-character-in-the-password/1728 "2023-02-09T15:10:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![ashjin](https://community.royalapps.com/user_avatar/community.royalapps.com/ashjin/32/538_2.png) [@ashjin](https://community.royalapps.com/u/ashjin)
#### Post date: [February 9, 2023, 3:10pm UTC](https://community.royalapps.com/t/uri-scheme-does-not-work-when-there-is-an-encoded-character-in-the-password/1728/1 "2023-02-09T15:10:28Z")

</div>

Hello,

How do I use the URI for an adhoc connection, when the password has the ‘&’ character in it? Encoding special characters in the password works for everything except ‘&’

Example URI to reproduce problem:

```auto
open 'rtsx://rdp://localhost:3303?using=adhoc&username=Administrator&password=%26'

```

This results in an adhoc connection with the password empty instead of a single ‘&’.

Does anyone have an insight into this?

My env:

Royal TSX (macOS Monterey)

Version 6.0.0.3 (Beta)

---

<div class="post-metadata">

### Author: ![christoph\_muehlberger](https://community.royalapps.com/user_avatar/community.royalapps.com/christoph_muehlberger/32/1572_2.png) [@christoph\_muehlberger](https://community.royalapps.com/u/christoph_muehlberger)
#### Post date: [February 10, 2023, 9:57am UTC](https://community.royalapps.com/t/uri-scheme-does-not-work-when-there-is-an-encoded-character-in-the-password/1728/2 "2023-02-10T09:57:38Z")

</div>

Hi Ash,

please use `%2526` to escape the `&` character

In my example I used `pass&word` as the password and was able to connect via:

```auto
open 'rtsx://rdp://192.168.0.199:3389?using=adhoc&username=testuser&password=pass%2526word&action=connect'

```

However, we recommend encoding the URL after the `rtsx://` block, so the correct string in my example would be:

```auto
open 'rtsx://rdp%3A//192.168.0.199%3A3389?using%3Dadhoc%26username%3Dtestuser%26password%3Dpass%2526word%26action%3Dconnect'

```

I hope this helps!

Best regards,

Christoph
