Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1O1foQ-0003Ay-QJ for mharc-grub-devel@gnu.org; Tue, 13 Apr 2010 09:05:54 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O1foP-0003At-Bh for grub-devel@gnu.org; Tue, 13 Apr 2010 09:05:53 -0400 Received: from [140.186.70.92] (port=48692 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O1fnW-0002wH-F0 for grub-devel@gnu.org; Tue, 13 Apr 2010 09:05:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O1fmv-0000lJ-A8 for grub-devel@gnu.org; Tue, 13 Apr 2010 09:04:26 -0400 Received: from smarthost02.mail.zen.net.uk ([212.23.3.141]:35527) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O1fmv-0000lA-5A for grub-devel@gnu.org; Tue, 13 Apr 2010 09:04:21 -0400 Received: from [82.69.40.219] (helo=riva.pelham.vpn.ucam.org) by smarthost02.mail.zen.net.uk with esmtp (Exim 4.63) (envelope-from ) id 1O1fmu-0003YI-3s; Tue, 13 Apr 2010 13:04:20 +0000 Received: from cjwatson by riva.pelham.vpn.ucam.org with local (Exim 3.36 #1 (Debian)) id 1O1fmt-0002bR-00; Tue, 13 Apr 2010 14:04:19 +0100 Date: Tue, 13 Apr 2010 14:04:19 +0100 From: Colin Watson To: The development of GNU GRUB Message-ID: <20100413130419.GA9578@riva.ucam.org> References: <20100410211015.GA26131@pina.cat> <20100412000906.GG11833@riva.ucam.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100412000906.GG11833@riva.ucam.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-Smarthost02-IP: [82.69.40.219] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: marcos@softastur.org, malditoastur@gmail.com Subject: Re: escape strings in grub.cfg X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 13:05:53 -0000 On Mon, Apr 12, 2010 at 01:09:06AM +0100, Colin Watson wrote: > With my suggestion, I'd recommend: > > gettext_quoted () { > gettext "$@" | sed "s/'/'\\\\''/g" > } > > ... and then make sure it's enclosed in '' rather than "" wherever it's > used (or modify the sed to put single-quotes at the start and end, if > that works out neater). I've gone ahead and committed a patch based on this to trunk, and I'll backport it to Ubuntu Lucid shortly as well. Testing welcome! -- Colin Watson [cjwatson@ubuntu.com]