mirror of
https://github.com/getpelican/pelican.git
synced 2026-05-30 07:06:56 +02:00
Sanitize slashes in WordPress import. Fixes #3561
Fix code style: use double quotes in importer
This commit is contained in:
parent
3c69dc68d2
commit
084bbd3102
2 changed files with 6 additions and 0 deletions
3
RELEASE.md
Normal file
3
RELEASE.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Release type: patch
|
||||
|
||||
Sanitize slashes in WordPress import titles to prevent crash. Fixes #3561
|
||||
|
|
@ -968,6 +968,9 @@ def fields2pelican(
|
|||
if is_pandoc_needed(in_markup) and not pandoc_version:
|
||||
posts_require_pandoc.append(filename)
|
||||
|
||||
#Replace "/" with "-" in filename
|
||||
filename = filename.replace("/", "-")
|
||||
|
||||
slug = (not disable_slugs and filename) or None
|
||||
assert slug is None or filename == os.path.basename(filename), (
|
||||
f"filename is not a basename: {filename}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue