Fixed the jQuery URL encoding behavior by adapting the doPost function