Fix the encoding of commands for use in the URL.