Skip to content
Snippets Groups Projects
Commit 8fed2de6 authored by Andreas Schärtl's avatar Andreas Schärtl
Browse files

fix-rdf-file: don't use uri escape

We'll have to get an iri lib or better yet fix the export in the long
run.
parent 4fdf6f3e
No related branches found
No related tags found
No related merge requests found
......@@ -8,10 +8,20 @@ import sys
def fix_quoted(s: str) -> str:
payload = s.strip('"')
fixed = parse.quote(payload)
fixed = fixed.replace('http%3A', 'http:')
fixed = fixed.replace('https%3A', 'https:')
return '"%s"' % fixed
#fixed = parse.quote(payload)
#fixed = fixed.replace('http%3A', 'http:')
#fixed = fixed.replace('https%3A', 'https:')
bad_chars = (
'|', '\\', ' ', '^'
)
for c in bad_chars:
escaped = '%' + '%X' % ord(c)
payload = payload.replace(c, escaped)
return '"%s"' % payload
def print_fixed_line(line: str):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment