You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When processing bibtex entries, where the fields are delimited by double quotes, embedded double quotes should be escaped by {"}, according to https://tug.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf, page 20. v2.0.0b7 however can't cope with that.
Can't see an easy fix in the current parsing technique.
Reproducing
Version: 2.0.0b7
Code:
importbibtexparser# title according to page 20 of https://tug.ctan.org/info/bibtex/tamethebeast/ttb_en.pdfbibentrytext='''@inproceedings{quotingproblem, pages = "23--26", title = "Comments on {"}Filenames and Fonts{"}",}'''library=bibtexparser.parse_string(bibentrytext)
new_bibtex_str=bibtexparser.write_string(library)
print(new_bibtex_str)
Bibtex:
@inproceedings{quotingproblem,
pages = "23--26",
title = "Comments on {"}Filenames and Fonts{"}",
}
Workaround
Find such fields by hand and use {...} delimiters. Since long or multiline fields (abstract, long titles, ...) might be affected, this is not easily done in a secure way with some REs.
Remaining Questions (Optional)
Please tick all that apply:
I would be willing to contribute a PR to fix this issue.
This issue is a blocker, I'd be grateful for an early fix.
The text was updated successfully, but these errors were encountered:
Describe the bug
When processing bibtex entries, where the fields are delimited by double quotes, embedded double quotes should be escaped by {"}, according to https://tug.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf, page 20. v2.0.0b7 however can't cope with that.
Can't see an easy fix in the current parsing technique.
Reproducing
Version: 2.0.0b7
Code:
Bibtex:
Workaround
Find such fields by hand and use {...} delimiters. Since long or multiline fields (abstract, long titles, ...) might be affected, this is not easily done in a secure way with some REs.
Remaining Questions (Optional)
Please tick all that apply:
The text was updated successfully, but these errors were encountered: