Added entity escaping