Properly encode username in Message::getUsername()