Overview
SHA1 Hash: | 9f89a8e68e6cf18256fe6af158cf18816b151ee7 |
---|---|
Date: | 2007-10-10 15:21:53 |
User: | drh |
Comment: | Fix the wiki editor so that it can handle wiki page names that include spaces. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/main.c from [157f4f5378] to [9a7566a7fb].
@@ -481,19 +481,20 @@ g.zPath = &zPath[1]; for(i=1; zPath[i] && zPath[i]!='/'; i++){} if( zPath[i]=='/' ){ zPath[i] = 0; g.zExtra = &zPath[i+1]; - + }else{ + g.zExtra = 0; + } + g.zBaseURL = get_base_url(); + if( g.zExtra ){ /* CGI parameters get this treatment elsewhere, but places like getfile ** will use g.zExtra directly. */ dehttpize(g.zExtra); - }else{ - g.zExtra = 0; - } - g.zBaseURL = get_base_url(); + } /* Prevent robots from indexing this site. */ if( strcmp(g.zPath, "robots.txt")==0 ){ cgi_set_content_type("text/plain");
Modified src/wiki.c from [22c7d6d4bb] to [83c17e31dc].
@@ -213,11 +213,11 @@ for(n=2, z=zBody; z[0]; z++){ if( z[0]=='\n' ) n++; } if( n<20 ) n = 20; if( n>200 ) n = 200; - @ <form method="POST" action="%s(g.zBaseURL)/wikiedit/%s(g.zExtra)"> + @ <form method="POST" action="%s(g.zBaseURL)/wikiedit/%t(g.zExtra)"> @ <textarea name="w" class="wikiedit" cols="80" @ rows="%d(n)" wrap="virtual">%h(zBody)</textarea> @ <br> @ <input type="submit" name="preview" value="Preview Your Changes"> @ <input type="submit" name="submit" value="Apply These Changes">