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

emacs-w3m encodes CGI query strings improperly!



i've got a wiki running here, and when saving an edited page, the URL
submitted looks like

  http://127.0.0.1:8882/cgi/awki.cgi?save=true&page=ClemensFischer

this URI should have been:

  http://127.0.0.1:8882/cgi/awki.cgi?save=true&page=ClemensFischer

(note `&' instead of `&')  note that this is a wiki edit POSTing
simple text, not HTML markup.

thus the not-so-smart CGI thinks the URI is finished or useless after
`... ?save=true...' and doesn't see the page name to be saved.  this
will always overwrite my FrontPage and renders emacs-w3m useless for
this particular task.  i like emacs-w3m and use it all the time.

i checked this behaviour with text-browsers elinks(1) and w3m(1) from
the command line, and these browsers do not exhibit this bug.  the bug
can be repeated anytime, but only from inside emacs-w3m.

the HTML of the page in question just before submitting the edit is:

,----
| <html>
| <head>
| <title>FrontPage</title>
| </head>
| <body>
| <h1><img src="/awki.png" width="48" height="39" align="left">
| <a href="/cgi/awki.cgi/FullSearch?string=FrontPage">FrontPage</a></h1><hr>
| <form action="/cgi/awki.cgi?save=true&amp;page=FrontPage" method="POST">
| <textarea name="text" rows=25 cols=80>
| ClemensFischer, NochMal!
| 
| funny remarks go under FunnyRemarks...
| 
| </textarea><br />
| <input type="submit" value="save">
| Comment: <input type="text" name="string" maxlength=80 size=50>
| <br>Convert runs of 8 spaces to Tab <input type="checkbox" name="convertspaces">
| </form>
| <small><strong>Emphases:</strong>...
| <hr>
| <a href="/cgi/awki.cgi?edit=true&amp;page=FrontPage">Edit FrontPage</a>
| <a href="/cgi/awki.cgi/FrontPage">FrontPage</a>
| <a href="/cgi/awki.cgi/PageList">PageList</a>
| <a href="/cgi/awki.cgi/RecentChanges">RecentChanges</a>
| <a href="/cgi/awki.cgi/FrontPage?history=true">PageHistory</a>
| <form action="/cgi/awki.cgi/FullSearch" method="GET" align="right">
| <input type="text" name="string">
| <input type="submit" value="search">
| </form>
| </body>
| </html>
`----

(sequences of `...' to shorten this report).  you may note the hrefs
at the end:

  <a href="/cgi/awki.cgi?edit=true&amp;page=FrontPage">Edit FrontPage</a>
  <a href="/cgi/awki.cgi/FrontPage?history=true">PageHistory</a>

the former line has `&amp;' within the quotes, the latter contains the
customary, unencoded ASCII.  so i cannot use my wiki with emacs-w3m!


regards,

  clemens


================================================================

System Info to help track down your bug:
---------------------------------------
emacs-w3m-version
 => "1.3.151"
emacs-version
 => "GNU Emacs 21.3.1 (i386-unknown-freebsd4.8, X toolkit)\n of 2003-04-25 on spotteswoode.dnsalias.org"
mule-version
 => "5.0 (SAKAKI)"
system-type
 => berkeley-unix
w3m-version
 => "w3m/0.4.1+cvs-1.840"
w3m-type
 => w3m
w3m-compile-options
 => ("lang=en" "image" "color" "ansi-color" "mouse" "sysmouse" "menu" "cookie" "ssl" "ssl-verify" "external-uri-loader" "w3mmailer" "nntp" "ipv6" "alarm" "mark")
w3m-language
 => nil
w3m-command-arguments
 => nil
w3m-command-arguments-alist
 => nil
w3m-command-environment
 => nil
w3m-use-mule-ucs
 => nil