Fossil SCM
Change the minimum length for wiki page names from 3 to 1.
Commit
b7ff13a0aa6317f224fa9af84d5f975b33c1dfdf
Parent
d9ff96820407a8a…
1 file changed
+3
-3
+3
-3
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -27,11 +27,11 @@ | ||
| 27 | 27 | ** Return true if the input string is a well-formed wiki page name. |
| 28 | 28 | ** |
| 29 | 29 | ** Well-formed wiki page names do not begin or end with whitespace, |
| 30 | 30 | ** and do not contain tabs or other control characters and do not |
| 31 | 31 | ** contain more than a single space character in a row. Well-formed |
| 32 | -** names must be between 3 and 100 characters in length, inclusive. | |
| 32 | +** names must be between 1 and 100 characters in length, inclusive. | |
| 33 | 33 | */ |
| 34 | 34 | int wiki_name_is_wellformed(const unsigned char *z){ |
| 35 | 35 | int i; |
| 36 | 36 | if( z[0]<=0x20 ){ |
| 37 | 37 | return 0; |
| @@ -39,11 +39,11 @@ | ||
| 39 | 39 | for(i=1; z[i]; i++){ |
| 40 | 40 | if( z[i]<0x20 ) return 0; |
| 41 | 41 | if( z[i]==0x20 && z[i-1]==0x20 ) return 0; |
| 42 | 42 | } |
| 43 | 43 | if( z[i-1]==' ' ) return 0; |
| 44 | - if( i<3 || i>100 ) return 0; | |
| 44 | + if( i<1 || i>100 ) return 0; | |
| 45 | 45 | return 1; |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /* |
| 49 | 49 | ** Output rules for well-formed wiki pages |
| @@ -52,11 +52,11 @@ | ||
| 52 | 52 | @ <ul> |
| 53 | 53 | @ <li> Must not begin or end with a space.</li> |
| 54 | 54 | @ <li> Must not contain any control characters, including tab or |
| 55 | 55 | @ newline.</li> |
| 56 | 56 | @ <li> Must not have two or more spaces in a row internally.</li> |
| 57 | - @ <li> Must be between 3 and 100 characters in length.</li> | |
| 57 | + @ <li> Must be between 1 and 100 characters in length.</li> | |
| 58 | 58 | @ </ul> |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /* |
| 62 | 62 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 63 | 63 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -27,11 +27,11 @@ | |
| 27 | ** Return true if the input string is a well-formed wiki page name. |
| 28 | ** |
| 29 | ** Well-formed wiki page names do not begin or end with whitespace, |
| 30 | ** and do not contain tabs or other control characters and do not |
| 31 | ** contain more than a single space character in a row. Well-formed |
| 32 | ** names must be between 3 and 100 characters in length, inclusive. |
| 33 | */ |
| 34 | int wiki_name_is_wellformed(const unsigned char *z){ |
| 35 | int i; |
| 36 | if( z[0]<=0x20 ){ |
| 37 | return 0; |
| @@ -39,11 +39,11 @@ | |
| 39 | for(i=1; z[i]; i++){ |
| 40 | if( z[i]<0x20 ) return 0; |
| 41 | if( z[i]==0x20 && z[i-1]==0x20 ) return 0; |
| 42 | } |
| 43 | if( z[i-1]==' ' ) return 0; |
| 44 | if( i<3 || i>100 ) return 0; |
| 45 | return 1; |
| 46 | } |
| 47 | |
| 48 | /* |
| 49 | ** Output rules for well-formed wiki pages |
| @@ -52,11 +52,11 @@ | |
| 52 | @ <ul> |
| 53 | @ <li> Must not begin or end with a space.</li> |
| 54 | @ <li> Must not contain any control characters, including tab or |
| 55 | @ newline.</li> |
| 56 | @ <li> Must not have two or more spaces in a row internally.</li> |
| 57 | @ <li> Must be between 3 and 100 characters in length.</li> |
| 58 | @ </ul> |
| 59 | } |
| 60 | |
| 61 | /* |
| 62 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 63 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -27,11 +27,11 @@ | |
| 27 | ** Return true if the input string is a well-formed wiki page name. |
| 28 | ** |
| 29 | ** Well-formed wiki page names do not begin or end with whitespace, |
| 30 | ** and do not contain tabs or other control characters and do not |
| 31 | ** contain more than a single space character in a row. Well-formed |
| 32 | ** names must be between 1 and 100 characters in length, inclusive. |
| 33 | */ |
| 34 | int wiki_name_is_wellformed(const unsigned char *z){ |
| 35 | int i; |
| 36 | if( z[0]<=0x20 ){ |
| 37 | return 0; |
| @@ -39,11 +39,11 @@ | |
| 39 | for(i=1; z[i]; i++){ |
| 40 | if( z[i]<0x20 ) return 0; |
| 41 | if( z[i]==0x20 && z[i-1]==0x20 ) return 0; |
| 42 | } |
| 43 | if( z[i-1]==' ' ) return 0; |
| 44 | if( i<1 || i>100 ) return 0; |
| 45 | return 1; |
| 46 | } |
| 47 | |
| 48 | /* |
| 49 | ** Output rules for well-formed wiki pages |
| @@ -52,11 +52,11 @@ | |
| 52 | @ <ul> |
| 53 | @ <li> Must not begin or end with a space.</li> |
| 54 | @ <li> Must not contain any control characters, including tab or |
| 55 | @ newline.</li> |
| 56 | @ <li> Must not have two or more spaces in a row internally.</li> |
| 57 | @ <li> Must be between 1 and 100 characters in length.</li> |
| 58 | @ </ul> |
| 59 | } |
| 60 | |
| 61 | /* |
| 62 | ** Check a wiki name. If it is not well-formed, then issue an error |
| 63 |