[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: BUG REPORT: Website META Language 1.7.3 (30-Sep-1999)



On Sat, 2 Oct 1999, Jan Ulrich Hasecke wrote:

> After a sucessful installation of wml 1.7.3 I get the following error
> message when compiling my files:
> 
> [juh@hasecke www.sudelbuch.de]$ wmk -f 1999/19991001.wml
> /opt/wml/bin/wml -n -o (ALL-LANG_*)uLANG_DA:19991001.html      -o (ALL-LANG_*)uLANG_HE:../heute/index.html 19991001.wml
> sh: syntax error near unexpected token `(A'
> sh: -c: line 1: `/opt/wml/bin/wml -n -o (ALL-LANG_*)uLANG_DA:19991001.html      -o (ALL-LANG_*)uLANG_HE:../heute/index.html 19991001.wml'
> ** WMk:Break: Error in WML (rc=512)   

Hi Jan Ulrich,

you're right, below is a patch you may apply to wmk or wmk.src.
Thanx for your bug report.

--- wmk.src	1999/09/30 09:28:07	1.21
+++ wmk.src	1999/10/03 20:01:35
@@ -489,8 +489,11 @@
 #   when shell metachars exists
 sub quotearg {
     my ($arg) = @_;
-    if ($arg !~ m|^'.*'$|) {
-        $arg =~ s|([\$"`])|\\$1|sg;
+    if ($arg !~ m|^'.*'$| and $arg !~ m|^".*"$|) {
+        if ($arg =~ m|[\[\]()!*?&"']|) {
+            $arg =~ s|'|\\'|sg;
+            $arg = "'".$arg."'";
+        }
     }
     return $arg;
 }
@@ -530,6 +533,7 @@
     if ($opts !~ m|-o|) {
         $opts .= " -o ${base}.html";
     }
+    $opts =~ s|(\s*)(\S+)|' '.&quotearg($2)|sge;
     $opts =~ s|^\s+||;
     $opts =~ s|\s+$||;
 


-- 
Denis Barbier
WML Maintainer


______________________________________________________________________
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com