special character escaping and tag search matching