optimised and used riddle escape to permit special characters