mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Python-Markdown quote's URL's, we need to unquote to use on filesystem
Fixes #1143 Closes #1095 Closes #1149
This commit is contained in:
parent
e10fe42928
commit
da690dfc37
2 changed files with 30 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals, print_function
|
||||
import six
|
||||
from six.moves.urllib.parse import unquote
|
||||
|
||||
import copy
|
||||
import locale
|
||||
|
|
@ -215,6 +216,12 @@ class Content(object):
|
|||
os.path.join(self.relative_dir, path)
|
||||
)
|
||||
|
||||
if path not in self._context['filenames']:
|
||||
unquoted_path = path.replace('%20', ' ')
|
||||
|
||||
if unquoted_path in self._context['filenames']:
|
||||
path = unquoted_path
|
||||
|
||||
if path in self._context['filenames']:
|
||||
origin = '/'.join((siteurl,
|
||||
self._context['filenames'][path].url))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue