added magic quotes detection