Escape MongoDB queries to store them inside MongoDB