I have a service that takes in two parameters. The URL and grammar look like:

http://localhost:9511/service/param1/param2

<grammar>res:/service/
  <groupname="param1">
    <regextype="active-escaped-uri-loose" />
  </group>/
  <groupname="param2">
    <regextype="active-escaped-uri-loose" />
  </group>
</grammar>

The parameters originate in a web form so I have almost no control over what is being passed into this service. Everything works fine until someone inputs something with a slash such as "N/A". This could result in something like:

http://localhost:9511/service/N/A/N/A

In the service, param1 is N/A/N and param2 is A. I've tried URL encoding the params so the slashes would be changed to %2F but this seems to have no effect.

http://localhost:9511/service/N%2FA/N%2FA

It seems like the URL is being un-encoded prior to being matched against the grammars. Is there anything I can do to keep the slashes in the parameters but have them not affect the grammar matching?