Bug#193759: twm: support for " in menu entry title.
Package: twm
Version: 4.2.1-6
Severity: minor
Tags: patch
Hello Branden,
The following menu entry break twm menu completly.
?package(local.test):command="/usr/bin/bc" needs="text" \
section="Apps/Test" title="test \""
Here a patch that quote properly the " character in menu title.
This a fairly minor issue, but since I have a patch at hand...
BTW, I would like to take the oportunity to remind you that
auto-generated menu files should be moved to /var.
Cheers,
--
Bill. <ballombe@debian.org>
Imagine a large red swirl here.
-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux seventeen 2.4.20 #1 Mon Apr 14 16:02:08 CEST 2003 i686
Locale: LANG=french, LC_CTYPE=french
Versions of packages twm depends on:
ii libc6 2.3.1-17 GNU C Library: Shared libraries an
ii menu 2.1.8-2 Provides update-menus functions fo
ii xlibs 4.2.1-6 X Window System client libraries
-- no debconf information
--- /etc/menu-methods/twm Sun Nov 25 23:52:43 2001
+++ /sid/etc/menu-methods/twm Sun May 18 18:21:30 2003
@@ -14,7 +14,9 @@
compat="menu-2"
-function f($com)=" \"" title() "\" f.exec \"" esc($com,"\"") " &\"\n";
+function q($com)=esc($com,"\"");
+function f($com)=" \"" q(title()) "\" f.exec \"" q($com) " &\"\n";
+
#This doesn't seem to be possible with twm: wm="f.restart \"${title}\"\\n"
supported;
@@ -24,9 +26,9 @@
# text= " \"" $title "\" f.exec \"xterm -title \\\""
# $title "\\\" -e " esc($command,"\"") " &\"\n";
endsupported;
-startmenu= "menu \"" $section "\"\n{\n";
+startmenu= "menu \"" q($section) "\"\n{\n";
endmenu= "}\n";
-submenutitle=" \"" title() "\" f.menu \"" $section "\"\n";
+submenutitle=" \"" q(title()) "\" f.menu \"" q($section) "\"\n";
genmenu= "menudefs.hook";
rcfile= "system.twmrc";
examplercfile="system.twmrc-menu";
Reply to: