Skip to content

Commit

Permalink
Escape double quotes in stork TOML file. Fixes pelican-plugins#3
Browse files Browse the repository at this point in the history
  • Loading branch information
s3lph committed Nov 8, 2022
1 parent ec3f91a commit 5b2cfcb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pelican/plugins/search/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ def generate_output(self, writer):
page_to_index = page.save_as
if self.search_mode == "source":
page_to_index = page.relative_source_path
# Escape double quotes in title
title = striptags(page.title).replace('"', '\\"')
input_file = f"""
[[input.files]]
path = "{page_to_index}"
url = "/{page.url}"
title = "{striptags(page.title)}"
title = "{title}"
"""
input_files = "".join([input_files, input_file])

Expand Down

0 comments on commit 5b2cfcb

Please sign in to comment.