Fixed cleaning for long request arrays in routing and decoding with magic quotes on, closes #608 and closes #609