kovidgoyal/calibre — pull request #125 by alexbiddle (2013-10-28 11:55:07+00:00)
Title:  Calibre does not create a valid .bib file

When a user uses a trailing curly brace in bibtex comment field, it creates an invalid bibtex file.
https://bugs.launchpad.net/calibre/+bug/1228905

This fix strips out orphan curly braces, while leaving matching braces in place.