Escapes special characters in description

main
Amlesh Sivanantham (zamlz) 6 years ago
parent 1f1bbea917
commit 3ee2c1eaec
No known key found for this signature in database
GPG Key ID: 882C395C3B28902C

@ -34,4 +34,6 @@ def git_commit_event(PaperEventInstance):
if isinstance(PaperEventInstance, RenameEvent):
git.shell("add \*/{}.\*".format(PaperEventInstance.old_citekey))
git.shell("add \*/{}.\*".format(PaperEventInstance.citekey))
git.shell('commit -m "{}"'.format(PaperEventInstance.description))
cmesg = PaperEventInstance.description
cmesg = cmesg.replace('\\','\\\\').replace('"','\\"').replace('$','\\$').replace('`','\\`')
git.shell('commit -m "{}"'.format(cmesg))

Loading…
Cancel
Save