From: Eric S. Raymond Date: Mon, 10 Nov 2014 16:13:39 +0000 (-0500) Subject: Fix a bug in shell-edcaping comment arguments. Spotted by chungy. X-Git-Tag: 0.4~17 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=3e6ed38ccea22475b72db1bbb35748ea5a1a88dd;p=src.git Fix a bug in shell-edcaping comment arguments. Spotted by chungy. --- diff --git a/src b/src index 037ca74..cafc073 100755 --- a/src +++ b/src @@ -420,7 +420,7 @@ class CommentContext: if not self.comment.endswith("\n"): self.comment += "\n" # Because it's going to be handed back as a shell argument - self.comment = "'" + self.comment.replace("'", r"\'") + "'" + self.comment = "'" + self.comment.replace("'", r"'\''") + "'" def content(self): "Reurn the edited comment." return self.comment