Skip to content

Commit

Permalink
Fix source of backslashes in URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
tartley committed Jul 4, 2023
1 parent 2b40c40 commit ff131b8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nikola/nikola.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import logging
import operator
import os
import pathlib
import sys
import mimetypes
from collections import defaultdict
Expand Down Expand Up @@ -1926,7 +1927,8 @@ def path(self, kind, name, lang=None, is_link=False, **kwargs):
else:
return link
else:
return os.path.join(*path)
# URLs should always use forward slash separators, even on Windows
return pathlib.PurePosixPath(*path)

def post_path(self, name, lang):
"""Link to the destination of an element in the POSTS/PAGES settings.
Expand Down

0 comments on commit ff131b8

Please sign in to comment.