about 2x fast
@@ -74,8 +74,8 @@ _invalid_uri_chars = '<>" {}|\\^`'
def _is_valid_uri(uri):
- for c in uri:
- if c in _invalid_uri_chars:
+ for c in _invalid_uri_chars:
+ if c in uri:
return False
return True
