added function to remove query string from Freemarker