| | @@ -35,11 +35,11 @@ |
| 35 | 35 | ** Well-formed wiki page names do not begin or end with whitespace, |
| 36 | 36 | ** and do not contain tabs or other control characters and do not |
| 37 | 37 | ** contain more than a single space character in a row. Well-formed |
| 38 | 38 | ** names must be between 3 and 100 chracters in length, inclusive. |
| 39 | 39 | */ |
| 40 | | -int wiki_name_is_wellformed(const char *z){ |
| 40 | +int wiki_name_is_wellformed(const unsigned char *z){ |
| 41 | 41 | int i; |
| 42 | 42 | if( z[0]<=0x20 ){ |
| 43 | 43 | return 0; |
| 44 | 44 | } |
| 45 | 45 | for(i=1; z[i]; i++){ |
| | @@ -67,11 +67,11 @@ |
| 67 | 67 | /* |
| 68 | 68 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 69 | 69 | ** and return true. If it is well-formed, return false. |
| 70 | 70 | */ |
| 71 | 71 | static int check_name(const char *z){ |
| 72 | | - if( !wiki_name_is_wellformed(z) ){ |
| 72 | + if( !wiki_name_is_wellformed((const unsigned char *)z) ){ |
| 73 | 73 | style_header("Wiki Page Name Error"); |
| 74 | 74 | @ The wiki name "<b>%h(z)</b>" is not well-formed. Rules for |
| 75 | 75 | @ wiki page names: |
| 76 | 76 | well_formed_wiki_name_rules(); |
| 77 | 77 | style_footer(); |
| | @@ -345,11 +345,11 @@ |
| 345 | 345 | if( !g.okNewWiki ){ |
| 346 | 346 | login_needed(); |
| 347 | 347 | return; |
| 348 | 348 | } |
| 349 | 349 | zName = PD("name",""); |
| 350 | | - if( zName[0] && wiki_name_is_wellformed(zName) ){ |
| 350 | + if( zName[0] && wiki_name_is_wellformed((const unsigned char *)zName) ){ |
| 351 | 351 | cgi_redirectf("wikiedit?name=%T", zName); |
| 352 | 352 | } |
| 353 | 353 | style_header("Create A New Wiki Page"); |
| 354 | 354 | @ <p>Rules for wiki page names: |
| 355 | 355 | well_formed_wiki_name_rules(); |
| 356 | 356 | |