working pandoc URL unquoter
This commit is contained in:
parent
cbaaf2761d
commit
4ff9134479
@ -78,8 +78,12 @@ class PandocReader(BaseReader):
|
|||||||
status = proc.wait()
|
status = proc.wait()
|
||||||
if status:
|
if status:
|
||||||
raise subprocess.CalledProcessError(status, pandoc_cmd)
|
raise subprocess.CalledProcessError(status, pandoc_cmd)
|
||||||
|
# pandoc will aggressively percent-encode URLs, breaking things.
|
||||||
return urllib.parse.unquote(output), metadata
|
# This nasty hack will undo such quoting (in fact too aggressively, if
|
||||||
|
# I have percent signs in my content, but I don't
|
||||||
|
# so I don't care for now) str.replace might be saner.
|
||||||
|
output = urllib.parse.unquote(output)
|
||||||
|
return output, metadata
|
||||||
|
|
||||||
|
|
||||||
def add_reader(readers):
|
def add_reader(readers):
|
||||||
|
Loading…
Reference in New Issue
Block a user