Magic quotes handling