Correctly encode post and get vars