protect against / in page title (common in roam exports)

roam's namespace feature recommends the use of / in page titles, but
since we are using a file-based approach here important to filter them
out lest we end up with subfolder madness
This commit is contained in:
Nik V 2020-11-27 18:32:56 -08:00
parent e7c64d374c
commit 6e45be9b73

View file

@ -14,5 +14,11 @@
def canonical_wikilink(wikilink): def canonical_wikilink(wikilink):
# hack hack # hack hack
wikilink = wikilink.lower().replace(' ', '-').replace('\'', '').replace(',', '') wikilink = (
wikilink.lower()
.replace(' ', '-')
.replace('\'', '')
.replace(',', '')
.replace('/', '-')
)
return wikilink return wikilink