Added preg_quote protection, added doc