Is this pattern okay for checking escapes? I based it roughly on the XSS check.