diff options
| author | Nicholas Car <nicholas.car@surroundaustralia.com> | 2020-10-08 13:50:59 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-08 13:50:59 +1000 |
| commit | 2a696dfd9c189bd61e142c7b5a2b5f13fa8ddec3 (patch) | |
| tree | 05d8da034a2f1ffee230e5248a505efac64aa52c | |
| parent | 56dc4207ce6e7b11ed7b45fb4fd4020ba548e718 (diff) | |
| parent | 6484fcd2ac771c111577133e23be4a250c0e20de (diff) | |
| download | rdflib-2a696dfd9c189bd61e142c7b5a2b5f13fa8ddec3.tar.gz | |
Merge pull request #1177 from jbmchuck/master
URI Validation Performance Improvements
| -rw-r--r-- | rdflib/term.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rdflib/term.py b/rdflib/term.py index ac69c3bd..3a822158 100644 --- a/rdflib/term.py +++ b/rdflib/term.py @@ -74,7 +74,10 @@ _invalid_uri_chars = '<>" {}|\\^`' def _is_valid_uri(uri): - return all([ord(c) > 256 or not c in _invalid_uri_chars for c in uri]) + for c in _invalid_uri_chars: + if c in uri: + return False + return True _lang_tag_regex = compile("^[a-zA-Z]+(?:-[a-zA-Z0-9]+)*$") |
