Skip to content

Commit

Permalink
make 'Title' safe to bib formats
Browse files Browse the repository at this point in the history
  • Loading branch information
xlcnd committed Nov 4, 2020
1 parent 4ec095f commit bab657d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion isbnlib/dev/_fmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@
def _gen_proc(name, canonical):
if 'ISBN-13' in canonical:
canonical['ISBN'] = canonical.pop('ISBN-13')
canonical['Title'] = canonical.get('Title').replace('"', '\"')
canonical['Title'] = canonical.get('Title').replace('"', '\"').replace(
"'", "\'")
tpl = templates[name]
return Template(tpl).safe_substitute(canonical)

Expand Down

0 comments on commit bab657d

Please sign in to comment.