fix bug that broke requests containing a single quote in realm name