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

Re: serious form submission bug:!CURRENT_URL!



From: Katsumi Yamaoka <yamaoka@jpl.org>
Subject: [emacs-w3m:04630] Re: serious form submission bug: !CURRENT_URL!
Message-ID: <yotlhebkmdmd.fsf@jpl.org>
Date: Tue, 04 Feb 2003 21:31:06 +0900

> >   Title:          vmailmgr@lists.em.ca: Search Form
> >   URL:            http://lists.em.ca/?command=searchform&list=vmailmgr
> 
> > place some search term into the search box and hit the submit
> > button.  emacs-w3m will flunk out, the URL it submits is:
> 
> > http://lists.em.ca/!CURRENT_URL!?submit=Search+vmailmgr&terms=frontmail&list=vmailmgr&command=search
> 
> I don't know how to fix it so far, sorry.  However, I found the
> string "!CURRENT_URL!" in the w3m (not emacs-w3m) source files.
> Dones anyone know what is it?

Please try this patch.

Index: w3m-form.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m-form.el,v
retrieving revision 1.103
diff -c -u -r1.103 w3m-form.el
cvs server: conflicting specifications of output style
--- w3m-form.el	30 Jan 2003 07:34:23 -0000	1.103
+++ w3m-form.el	4 Feb 2003 14:54:39 -0000
@@ -1268,6 +1268,10 @@
 		  (if (string-match "\\?" w3m-current-url)
 		      (substring w3m-current-url 0 (match-beginning 0))
 		    w3m-current-url))))
+    (when (string-match "/!CURRENT_URL!$" url)
+      (setq url orig-url)
+      (when (string-match "\\?" orig-url)
+	(setq url (substring url 0 (match-beginning 0)))))
     (cond ((and (not (string= url orig-url))
 		(string-match "^https://"; orig-url)
 		(string-match "^http://"; url)

-- 
Hideyuki SHIRAI (mailto:shirai@rdmg.mgcs.mei.co.jp)