Fossil SCM
Merge the latest trunk enhancements into the min-from-to branch.
Commit
990e287a94c560f91dd665b7ac6daa4e5e877f29ee3f7b6ab6e0fecc1e3d0aa1
Parent
ef8052626707209…
12 files changed
+1
+1
+2
+1
+14
-9
+1
+57
+33
+2
+1
+12
+14
+1
| --- src/checkin.c | ||
| +++ src/checkin.c | ||
| @@ -2376,10 +2376,11 @@ | ||
| 2376 | 2376 | ** --no-verify Do not run before-commit hooks |
| 2377 | 2377 | ** --nosign Do not attempt to sign this commit with gpg |
| 2378 | 2378 | ** --nosync Do not auto-sync prior to committing |
| 2379 | 2379 | ** --override-lock Allow a check-in even though parent is locked |
| 2380 | 2380 | ** --private Do not sync changes and their descendants |
| 2381 | +** --proxy PROXY Use PROXY as http proxy during sync operation | |
| 2381 | 2382 | ** --tag TAG-NAME Assign given tag TAG-NAME to the check-in |
| 2382 | 2383 | ** --trace Debug tracing |
| 2383 | 2384 | ** --user-override USER USER to use instead of the current default |
| 2384 | 2385 | ** |
| 2385 | 2386 | ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in |
| 2386 | 2387 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2376,10 +2376,11 @@ | |
| 2376 | ** --no-verify Do not run before-commit hooks |
| 2377 | ** --nosign Do not attempt to sign this commit with gpg |
| 2378 | ** --nosync Do not auto-sync prior to committing |
| 2379 | ** --override-lock Allow a check-in even though parent is locked |
| 2380 | ** --private Do not sync changes and their descendants |
| 2381 | ** --tag TAG-NAME Assign given tag TAG-NAME to the check-in |
| 2382 | ** --trace Debug tracing |
| 2383 | ** --user-override USER USER to use instead of the current default |
| 2384 | ** |
| 2385 | ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in |
| 2386 |
| --- src/checkin.c | |
| +++ src/checkin.c | |
| @@ -2376,10 +2376,11 @@ | |
| 2376 | ** --no-verify Do not run before-commit hooks |
| 2377 | ** --nosign Do not attempt to sign this commit with gpg |
| 2378 | ** --nosync Do not auto-sync prior to committing |
| 2379 | ** --override-lock Allow a check-in even though parent is locked |
| 2380 | ** --private Do not sync changes and their descendants |
| 2381 | ** --proxy PROXY Use PROXY as http proxy during sync operation |
| 2382 | ** --tag TAG-NAME Assign given tag TAG-NAME to the check-in |
| 2383 | ** --trace Debug tracing |
| 2384 | ** --user-override USER USER to use instead of the current default |
| 2385 | ** |
| 2386 | ** DATETIME may be "now" or "YYYY-MM-DDTHH:MM:SS.SSS". If in |
| 2387 |
+1
| --- src/clone.c | ||
| +++ src/clone.c | ||
| @@ -129,10 +129,11 @@ | ||
| 129 | 129 | ** check-out |
| 130 | 130 | ** --nocompress Omit extra delta compression |
| 131 | 131 | ** --no-open Clone only. Do not open a check-out. |
| 132 | 132 | ** --once Don't remember the URI. |
| 133 | 133 | ** --private Also clone private branches |
| 134 | +** --proxy PROXY Use the specified HTTP proxy | |
| 134 | 135 | ** --save-http-password Remember the HTTP password without asking |
| 135 | 136 | ** -c|--ssh-command SSH Use SSH as the "ssh" command |
| 136 | 137 | ** --ssl-identity FILENAME Use the SSL identity if requested by the server |
| 137 | 138 | ** --transport-command CMD Use CMD to move messages to the server and back |
| 138 | 139 | ** -u|--unversioned Also sync unversioned content |
| 139 | 140 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -129,10 +129,11 @@ | |
| 129 | ** check-out |
| 130 | ** --nocompress Omit extra delta compression |
| 131 | ** --no-open Clone only. Do not open a check-out. |
| 132 | ** --once Don't remember the URI. |
| 133 | ** --private Also clone private branches |
| 134 | ** --save-http-password Remember the HTTP password without asking |
| 135 | ** -c|--ssh-command SSH Use SSH as the "ssh" command |
| 136 | ** --ssl-identity FILENAME Use the SSL identity if requested by the server |
| 137 | ** --transport-command CMD Use CMD to move messages to the server and back |
| 138 | ** -u|--unversioned Also sync unversioned content |
| 139 |
| --- src/clone.c | |
| +++ src/clone.c | |
| @@ -129,10 +129,11 @@ | |
| 129 | ** check-out |
| 130 | ** --nocompress Omit extra delta compression |
| 131 | ** --no-open Clone only. Do not open a check-out. |
| 132 | ** --once Don't remember the URI. |
| 133 | ** --private Also clone private branches |
| 134 | ** --proxy PROXY Use the specified HTTP proxy |
| 135 | ** --save-http-password Remember the HTTP password without asking |
| 136 | ** -c|--ssh-command SSH Use SSH as the "ssh" command |
| 137 | ** --ssl-identity FILENAME Use the SSL identity if requested by the server |
| 138 | ** --transport-command CMD Use CMD to move messages to the server and back |
| 139 | ** -u|--unversioned Also sync unversioned content |
| 140 |
+2
| --- src/configure.c | ||
| +++ src/configure.c | ||
| @@ -817,10 +817,12 @@ | ||
| 817 | 817 | ** |
| 818 | 818 | ** Synchronize configuration changes in the local repository with |
| 819 | 819 | ** the remote repository at URL. |
| 820 | 820 | ** |
| 821 | 821 | ** Options: |
| 822 | +** --proxy PROXY Use PROXY as http proxy during sync operation | |
| 823 | +** (used by pull, push and sync subcommands) | |
| 822 | 824 | ** -R|--repository REPO Affect repository REPO with changes |
| 823 | 825 | ** |
| 824 | 826 | ** See also: [[settings]], [[unset]] |
| 825 | 827 | */ |
| 826 | 828 | void configuration_cmd(void){ |
| 827 | 829 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -817,10 +817,12 @@ | |
| 817 | ** |
| 818 | ** Synchronize configuration changes in the local repository with |
| 819 | ** the remote repository at URL. |
| 820 | ** |
| 821 | ** Options: |
| 822 | ** -R|--repository REPO Affect repository REPO with changes |
| 823 | ** |
| 824 | ** See also: [[settings]], [[unset]] |
| 825 | */ |
| 826 | void configuration_cmd(void){ |
| 827 |
| --- src/configure.c | |
| +++ src/configure.c | |
| @@ -817,10 +817,12 @@ | |
| 817 | ** |
| 818 | ** Synchronize configuration changes in the local repository with |
| 819 | ** the remote repository at URL. |
| 820 | ** |
| 821 | ** Options: |
| 822 | ** --proxy PROXY Use PROXY as http proxy during sync operation |
| 823 | ** (used by pull, push and sync subcommands) |
| 824 | ** -R|--repository REPO Affect repository REPO with changes |
| 825 | ** |
| 826 | ** See also: [[settings]], [[unset]] |
| 827 | */ |
| 828 | void configuration_cmd(void){ |
| 829 |
M
src/db.c
+1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -4181,10 +4181,11 @@ | ||
| 4181 | 4181 | ** --force-missing Force opening a repository with missing content |
| 4182 | 4182 | ** -k|--keep Only modify the manifest file(s) |
| 4183 | 4183 | ** --nested Allow opening a repository inside an opened check-out |
| 4184 | 4184 | ** --nosync Do not auto-sync the repository prior to opening even |
| 4185 | 4185 | ** if the autosync setting is on. |
| 4186 | +** --proxy PROXY Use PROXY as http proxy during sync operation | |
| 4186 | 4187 | ** --repodir DIR If REPOSITORY is a URI that will be cloned, store |
| 4187 | 4188 | ** the clone in DIR rather than in "." |
| 4188 | 4189 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 4189 | 4190 | ** times (the timestamp of the last check-in which modified |
| 4190 | 4191 | ** them). |
| 4191 | 4192 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -4181,10 +4181,11 @@ | |
| 4181 | ** --force-missing Force opening a repository with missing content |
| 4182 | ** -k|--keep Only modify the manifest file(s) |
| 4183 | ** --nested Allow opening a repository inside an opened check-out |
| 4184 | ** --nosync Do not auto-sync the repository prior to opening even |
| 4185 | ** if the autosync setting is on. |
| 4186 | ** --repodir DIR If REPOSITORY is a URI that will be cloned, store |
| 4187 | ** the clone in DIR rather than in "." |
| 4188 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 4189 | ** times (the timestamp of the last check-in which modified |
| 4190 | ** them). |
| 4191 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -4181,10 +4181,11 @@ | |
| 4181 | ** --force-missing Force opening a repository with missing content |
| 4182 | ** -k|--keep Only modify the manifest file(s) |
| 4183 | ** --nested Allow opening a repository inside an opened check-out |
| 4184 | ** --nosync Do not auto-sync the repository prior to opening even |
| 4185 | ** if the autosync setting is on. |
| 4186 | ** --proxy PROXY Use PROXY as http proxy during sync operation |
| 4187 | ** --repodir DIR If REPOSITORY is a URI that will be cloned, store |
| 4188 | ** the clone in DIR rather than in "." |
| 4189 | ** --setmtime Set timestamps of all files to match their SCM-side |
| 4190 | ** times (the timestamp of the last check-in which modified |
| 4191 | ** them). |
| 4192 |
+14
-9
| --- src/dispatch.c | ||
| +++ src/dispatch.c | ||
| @@ -838,30 +838,35 @@ | ||
| 838 | 838 | if( zCmd && *zCmd ){ |
| 839 | 839 | int rc; |
| 840 | 840 | const CmdOrPage *pCmd = 0; |
| 841 | 841 | |
| 842 | 842 | style_set_current_feature("tkt"); |
| 843 | - style_header("Help: %s", zCmd); | |
| 844 | - | |
| 845 | - style_submenu_element("Command-List", "%R/help"); | |
| 843 | + style_submenu_element("Topic-List", "%R/help"); | |
| 846 | 844 | if( search_restrict(SRCH_HELP)!=0 ){ |
| 847 | 845 | style_submenu_element("Search","%R/search?y=h"); |
| 848 | 846 | } |
| 849 | 847 | rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd); |
| 850 | - if( *zCmd=='/' ){ | |
| 848 | + if( pCmd ){ | |
| 849 | + style_header("Help: %s", pCmd->zName); | |
| 850 | + }else{ | |
| 851 | + style_header("Help"); | |
| 852 | + } | |
| 853 | + if( pCmd==0 ){ | |
| 854 | + /* No <h1> line in this case */ | |
| 855 | + }else if( *zCmd=='/' ){ | |
| 851 | 856 | /* Some of the webpages require query parameters in order to work. |
| 852 | 857 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 853 | - @ <h1>The "%h(zCmd)" page:</h1> | |
| 858 | + @ <h1>The "%h(pCmd->zName)" page:</h1> | |
| 854 | 859 | }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){ |
| 855 | 860 | @ <h1>The "%h(pCmd->zName)" setting:</h1> |
| 856 | 861 | }else{ |
| 857 | - @ <h1>The "%h(zCmd)" command:</h1> | |
| 862 | + @ <h1>The "%h(pCmd->zName)" command:</h1> | |
| 858 | 863 | } |
| 859 | - if( rc==1 ){ | |
| 860 | - @ unknown command: %h(zCmd) | |
| 864 | + if( rc==1 || (rc==2 && zCmd[0]=='/') ){ | |
| 865 | + @ Unknown topic: "%h(zCmd)" | |
| 861 | 866 | }else if( rc==2 ){ |
| 862 | - @ ambiguous command prefix: %h(zCmd) | |
| 867 | + @ Ambiguous prefix: "%h(zCmd)" | |
| 863 | 868 | }else{ |
| 864 | 869 | if( pCmd->zHelp[0]==0 ){ |
| 865 | 870 | @ No help available for "%h(pCmd->zName)" |
| 866 | 871 | }else if( P("plaintext") ){ |
| 867 | 872 | Blob txt; |
| 868 | 873 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -838,30 +838,35 @@ | |
| 838 | if( zCmd && *zCmd ){ |
| 839 | int rc; |
| 840 | const CmdOrPage *pCmd = 0; |
| 841 | |
| 842 | style_set_current_feature("tkt"); |
| 843 | style_header("Help: %s", zCmd); |
| 844 | |
| 845 | style_submenu_element("Command-List", "%R/help"); |
| 846 | if( search_restrict(SRCH_HELP)!=0 ){ |
| 847 | style_submenu_element("Search","%R/search?y=h"); |
| 848 | } |
| 849 | rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd); |
| 850 | if( *zCmd=='/' ){ |
| 851 | /* Some of the webpages require query parameters in order to work. |
| 852 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 853 | @ <h1>The "%h(zCmd)" page:</h1> |
| 854 | }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){ |
| 855 | @ <h1>The "%h(pCmd->zName)" setting:</h1> |
| 856 | }else{ |
| 857 | @ <h1>The "%h(zCmd)" command:</h1> |
| 858 | } |
| 859 | if( rc==1 ){ |
| 860 | @ unknown command: %h(zCmd) |
| 861 | }else if( rc==2 ){ |
| 862 | @ ambiguous command prefix: %h(zCmd) |
| 863 | }else{ |
| 864 | if( pCmd->zHelp[0]==0 ){ |
| 865 | @ No help available for "%h(pCmd->zName)" |
| 866 | }else if( P("plaintext") ){ |
| 867 | Blob txt; |
| 868 |
| --- src/dispatch.c | |
| +++ src/dispatch.c | |
| @@ -838,30 +838,35 @@ | |
| 838 | if( zCmd && *zCmd ){ |
| 839 | int rc; |
| 840 | const CmdOrPage *pCmd = 0; |
| 841 | |
| 842 | style_set_current_feature("tkt"); |
| 843 | style_submenu_element("Topic-List", "%R/help"); |
| 844 | if( search_restrict(SRCH_HELP)!=0 ){ |
| 845 | style_submenu_element("Search","%R/search?y=h"); |
| 846 | } |
| 847 | rc = dispatch_name_search(zCmd, CMDFLAG_ANY|CMDFLAG_PREFIX, &pCmd); |
| 848 | if( pCmd ){ |
| 849 | style_header("Help: %s", pCmd->zName); |
| 850 | }else{ |
| 851 | style_header("Help"); |
| 852 | } |
| 853 | if( pCmd==0 ){ |
| 854 | /* No <h1> line in this case */ |
| 855 | }else if( *zCmd=='/' ){ |
| 856 | /* Some of the webpages require query parameters in order to work. |
| 857 | ** @ <h1>The "<a href='%R%s(zCmd)'>%s(zCmd)</a>" page:</h1> */ |
| 858 | @ <h1>The "%h(pCmd->zName)" page:</h1> |
| 859 | }else if( rc==0 && (pCmd->eCmdFlags & CMDFLAG_SETTING)!=0 ){ |
| 860 | @ <h1>The "%h(pCmd->zName)" setting:</h1> |
| 861 | }else{ |
| 862 | @ <h1>The "%h(pCmd->zName)" command:</h1> |
| 863 | } |
| 864 | if( rc==1 || (rc==2 && zCmd[0]=='/') ){ |
| 865 | @ Unknown topic: "%h(zCmd)" |
| 866 | }else if( rc==2 ){ |
| 867 | @ Ambiguous prefix: "%h(zCmd)" |
| 868 | }else{ |
| 869 | if( pCmd->zHelp[0]==0 ){ |
| 870 | @ No help available for "%h(pCmd->zName)" |
| 871 | }else if( P("plaintext") ){ |
| 872 | Blob txt; |
| 873 |
+1
| --- src/doc.c | ||
| +++ src/doc.c | ||
| @@ -807,10 +807,11 @@ | ||
| 807 | 807 | }else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){ |
| 808 | 808 | Blob tail = BLOB_INITIALIZER; |
| 809 | 809 | markdown_to_html(pBody, &title, &tail); |
| 810 | 810 | if( !isPopup ){ |
| 811 | 811 | if( blob_size(&title)>0 ){ |
| 812 | + markdown_dehtmlize_blob(&title); | |
| 812 | 813 | style_header("%s", blob_str(&title)); |
| 813 | 814 | }else{ |
| 814 | 815 | style_header("%s", zDefaultTitle); |
| 815 | 816 | } |
| 816 | 817 | } |
| 817 | 818 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -807,10 +807,11 @@ | |
| 807 | }else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){ |
| 808 | Blob tail = BLOB_INITIALIZER; |
| 809 | markdown_to_html(pBody, &title, &tail); |
| 810 | if( !isPopup ){ |
| 811 | if( blob_size(&title)>0 ){ |
| 812 | style_header("%s", blob_str(&title)); |
| 813 | }else{ |
| 814 | style_header("%s", zDefaultTitle); |
| 815 | } |
| 816 | } |
| 817 |
| --- src/doc.c | |
| +++ src/doc.c | |
| @@ -807,10 +807,11 @@ | |
| 807 | }else if( fossil_strcmp(zMime, "text/x-markdown")==0 ){ |
| 808 | Blob tail = BLOB_INITIALIZER; |
| 809 | markdown_to_html(pBody, &title, &tail); |
| 810 | if( !isPopup ){ |
| 811 | if( blob_size(&title)>0 ){ |
| 812 | markdown_dehtmlize_blob(&title); |
| 813 | style_header("%s", blob_str(&title)); |
| 814 | }else{ |
| 815 | style_header("%s", zDefaultTitle); |
| 816 | } |
| 817 | } |
| 818 |
+57
| --- src/markdown_html.c | ||
| +++ src/markdown_html.c | ||
| @@ -911,5 +911,62 @@ | ||
| 911 | 911 | html_renderer.opaque = &context; |
| 912 | 912 | if( output_title ) blob_reset(output_title); |
| 913 | 913 | blob_reset(output_body); |
| 914 | 914 | markdown(output_body, input_markdown, &html_renderer); |
| 915 | 915 | } |
| 916 | + | |
| 917 | +/* | |
| 918 | +** Undo HTML escapes in Blob p. In other words convert: | |
| 919 | +** | |
| 920 | +** & -> & | |
| 921 | +** < -> < | |
| 922 | +** > -> > | |
| 923 | +** " -> " | |
| 924 | +** &#NNN; -> ascii character NNN | |
| 925 | +*/ | |
| 926 | +void markdown_dehtmlize_blob(Blob *p){ | |
| 927 | + char *z; | |
| 928 | + unsigned int j, k; | |
| 929 | + | |
| 930 | + z = p->aData; | |
| 931 | + for(j=k=0; j<p->nUsed; j++){ | |
| 932 | + char c = z[j]; | |
| 933 | + if( c=='&' ){ | |
| 934 | + if( z[j+1]=='#' && fossil_isdigit(z[j+2]) ){ | |
| 935 | + int n = 3; | |
| 936 | + int x = z[j+2] - '0'; | |
| 937 | + if( fossil_isdigit(z[j+3]) ){ | |
| 938 | + x = x*10 + z[j+3] - '0'; | |
| 939 | + n++; | |
| 940 | + if( fossil_isdigit(z[j+4]) ){ | |
| 941 | + x = x*10 + z[j+4] - '0'; | |
| 942 | + n++; | |
| 943 | + } | |
| 944 | + } | |
| 945 | + if( z[j+n]==';' ){ | |
| 946 | + z[k++] = (char)x; | |
| 947 | + j += n; | |
| 948 | + }else{ | |
| 949 | + z[k++] = c; | |
| 950 | + } | |
| 951 | + }else if( memcmp(&z[j],"<",4)==0 ){ | |
| 952 | + z[k++] = '<'; | |
| 953 | + j += 3; | |
| 954 | + }else if( memcmp(&z[j],">",4)==0 ){ | |
| 955 | + z[k++] = '>'; | |
| 956 | + j += 3; | |
| 957 | + }else if( memcmp(&z[j],""",6)==0 ){ | |
| 958 | + z[k++] = '"'; | |
| 959 | + j += 5; | |
| 960 | + }else if( memcmp(&z[j],"&",5)==0 ){ | |
| 961 | + z[k++] = '&'; | |
| 962 | + j += 4; | |
| 963 | + }else{ | |
| 964 | + z[k++] = c; | |
| 965 | + } | |
| 966 | + }else{ | |
| 967 | + z[k++] = c; | |
| 968 | + } | |
| 969 | + } | |
| 970 | + z[k] = 0; | |
| 971 | + p->nUsed = k; | |
| 972 | +} | |
| 916 | 973 |
| --- src/markdown_html.c | |
| +++ src/markdown_html.c | |
| @@ -911,5 +911,62 @@ | |
| 911 | html_renderer.opaque = &context; |
| 912 | if( output_title ) blob_reset(output_title); |
| 913 | blob_reset(output_body); |
| 914 | markdown(output_body, input_markdown, &html_renderer); |
| 915 | } |
| 916 |
| --- src/markdown_html.c | |
| +++ src/markdown_html.c | |
| @@ -911,5 +911,62 @@ | |
| 911 | html_renderer.opaque = &context; |
| 912 | if( output_title ) blob_reset(output_title); |
| 913 | blob_reset(output_body); |
| 914 | markdown(output_body, input_markdown, &html_renderer); |
| 915 | } |
| 916 | |
| 917 | /* |
| 918 | ** Undo HTML escapes in Blob p. In other words convert: |
| 919 | ** |
| 920 | ** & -> & |
| 921 | ** < -> < |
| 922 | ** > -> > |
| 923 | ** " -> " |
| 924 | ** &#NNN; -> ascii character NNN |
| 925 | */ |
| 926 | void markdown_dehtmlize_blob(Blob *p){ |
| 927 | char *z; |
| 928 | unsigned int j, k; |
| 929 | |
| 930 | z = p->aData; |
| 931 | for(j=k=0; j<p->nUsed; j++){ |
| 932 | char c = z[j]; |
| 933 | if( c=='&' ){ |
| 934 | if( z[j+1]=='#' && fossil_isdigit(z[j+2]) ){ |
| 935 | int n = 3; |
| 936 | int x = z[j+2] - '0'; |
| 937 | if( fossil_isdigit(z[j+3]) ){ |
| 938 | x = x*10 + z[j+3] - '0'; |
| 939 | n++; |
| 940 | if( fossil_isdigit(z[j+4]) ){ |
| 941 | x = x*10 + z[j+4] - '0'; |
| 942 | n++; |
| 943 | } |
| 944 | } |
| 945 | if( z[j+n]==';' ){ |
| 946 | z[k++] = (char)x; |
| 947 | j += n; |
| 948 | }else{ |
| 949 | z[k++] = c; |
| 950 | } |
| 951 | }else if( memcmp(&z[j],"<",4)==0 ){ |
| 952 | z[k++] = '<'; |
| 953 | j += 3; |
| 954 | }else if( memcmp(&z[j],">",4)==0 ){ |
| 955 | z[k++] = '>'; |
| 956 | j += 3; |
| 957 | }else if( memcmp(&z[j],""",6)==0 ){ |
| 958 | z[k++] = '"'; |
| 959 | j += 5; |
| 960 | }else if( memcmp(&z[j],"&",5)==0 ){ |
| 961 | z[k++] = '&'; |
| 962 | j += 4; |
| 963 | }else{ |
| 964 | z[k++] = c; |
| 965 | } |
| 966 | }else{ |
| 967 | z[k++] = c; |
| 968 | } |
| 969 | } |
| 970 | z[k] = 0; |
| 971 | p->nUsed = k; |
| 972 | } |
| 973 |
+33
| --- src/style.c | ||
| +++ src/style.c | ||
| @@ -1340,10 +1340,43 @@ | ||
| 1340 | 1340 | && !login_has_capability(&c, 1, 0) ) zCap[i++] = c; |
| 1341 | 1341 | } |
| 1342 | 1342 | zCap[i] = 0; |
| 1343 | 1343 | return zCap; |
| 1344 | 1344 | } |
| 1345 | + | |
| 1346 | +/* | |
| 1347 | +** WEBPAGE: test-title | |
| 1348 | +** | |
| 1349 | +** Render a test page in which the page title is set by the "title" | |
| 1350 | +** query parameter. This can be used to show that HTML or Javascript | |
| 1351 | +** content in the title does not leak through into generated page, resulting | |
| 1352 | +** in an XSS issue. | |
| 1353 | +** | |
| 1354 | +** Due to the potential for abuse, this webpage is only available to | |
| 1355 | +** administrators. | |
| 1356 | +*/ | |
| 1357 | +void page_test_title(void){ | |
| 1358 | + const char *zTitle; | |
| 1359 | + login_check_credentials(); | |
| 1360 | + if( !g.perm.Admin ){ | |
| 1361 | + login_needed(0); | |
| 1362 | + } | |
| 1363 | + zTitle = P("title"); | |
| 1364 | + if( zTitle==0 ){ | |
| 1365 | + zTitle = "(No Title)"; | |
| 1366 | + } | |
| 1367 | + style_header("%s", zTitle); | |
| 1368 | + @ <p> | |
| 1369 | + @ This page sets its title to the value of the "title" query parameter. | |
| 1370 | + @ The form below is a convenient way to set the title query parameter: | |
| 1371 | + @ | |
| 1372 | + @ <form method="GET"> | |
| 1373 | + @ Title: <input type="text" size="50" name="title" value="%h(zTitle)"> | |
| 1374 | + @ <input type="submit" value="Submit"> | |
| 1375 | + @ </form> | |
| 1376 | + style_finish_page(); | |
| 1377 | +} | |
| 1345 | 1378 | |
| 1346 | 1379 | /* |
| 1347 | 1380 | ** WEBPAGE: test_env |
| 1348 | 1381 | ** |
| 1349 | 1382 | ** Display CGI-variables and other aspects of the run-time |
| 1350 | 1383 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -1340,10 +1340,43 @@ | |
| 1340 | && !login_has_capability(&c, 1, 0) ) zCap[i++] = c; |
| 1341 | } |
| 1342 | zCap[i] = 0; |
| 1343 | return zCap; |
| 1344 | } |
| 1345 | |
| 1346 | /* |
| 1347 | ** WEBPAGE: test_env |
| 1348 | ** |
| 1349 | ** Display CGI-variables and other aspects of the run-time |
| 1350 |
| --- src/style.c | |
| +++ src/style.c | |
| @@ -1340,10 +1340,43 @@ | |
| 1340 | && !login_has_capability(&c, 1, 0) ) zCap[i++] = c; |
| 1341 | } |
| 1342 | zCap[i] = 0; |
| 1343 | return zCap; |
| 1344 | } |
| 1345 | |
| 1346 | /* |
| 1347 | ** WEBPAGE: test-title |
| 1348 | ** |
| 1349 | ** Render a test page in which the page title is set by the "title" |
| 1350 | ** query parameter. This can be used to show that HTML or Javascript |
| 1351 | ** content in the title does not leak through into generated page, resulting |
| 1352 | ** in an XSS issue. |
| 1353 | ** |
| 1354 | ** Due to the potential for abuse, this webpage is only available to |
| 1355 | ** administrators. |
| 1356 | */ |
| 1357 | void page_test_title(void){ |
| 1358 | const char *zTitle; |
| 1359 | login_check_credentials(); |
| 1360 | if( !g.perm.Admin ){ |
| 1361 | login_needed(0); |
| 1362 | } |
| 1363 | zTitle = P("title"); |
| 1364 | if( zTitle==0 ){ |
| 1365 | zTitle = "(No Title)"; |
| 1366 | } |
| 1367 | style_header("%s", zTitle); |
| 1368 | @ <p> |
| 1369 | @ This page sets its title to the value of the "title" query parameter. |
| 1370 | @ The form below is a convenient way to set the title query parameter: |
| 1371 | @ |
| 1372 | @ <form method="GET"> |
| 1373 | @ Title: <input type="text" size="50" name="title" value="%h(zTitle)"> |
| 1374 | @ <input type="submit" value="Submit"> |
| 1375 | @ </form> |
| 1376 | style_finish_page(); |
| 1377 | } |
| 1378 | |
| 1379 | /* |
| 1380 | ** WEBPAGE: test_env |
| 1381 | ** |
| 1382 | ** Display CGI-variables and other aspects of the run-time |
| 1383 |
+2
| --- src/unversioned.c | ||
| +++ src/unversioned.c | ||
| @@ -266,10 +266,11 @@ | ||
| 266 | 266 | ** URL. |
| 267 | 267 | ** |
| 268 | 268 | ** Options: |
| 269 | 269 | ** -v|--verbose Extra diagnostic output |
| 270 | 270 | ** -n|--dry-run Show what would have happened |
| 271 | +** --proxy PROXY Use the specified HTTP proxy | |
| 271 | 272 | ** |
| 272 | 273 | ** remove|rm|delete FILE ... |
| 273 | 274 | ** Remove unversioned files from the local repository. |
| 274 | 275 | ** Changes are not pushed to other repositories until |
| 275 | 276 | ** the next sync. |
| @@ -285,10 +286,11 @@ | ||
| 285 | 286 | ** The remote account requires the 'y' capability. |
| 286 | 287 | ** |
| 287 | 288 | ** Options: |
| 288 | 289 | ** -v|--verbose Extra diagnostic output |
| 289 | 290 | ** -n|--dry-run Show what would have happened |
| 291 | +** --proxy PROXY Use the specified HTTP proxy | |
| 290 | 292 | ** |
| 291 | 293 | ** touch FILE ... Update the TIMESTAMP on all of the listed files |
| 292 | 294 | ** |
| 293 | 295 | ** Options: |
| 294 | 296 | ** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add", |
| 295 | 297 |
| --- src/unversioned.c | |
| +++ src/unversioned.c | |
| @@ -266,10 +266,11 @@ | |
| 266 | ** URL. |
| 267 | ** |
| 268 | ** Options: |
| 269 | ** -v|--verbose Extra diagnostic output |
| 270 | ** -n|--dry-run Show what would have happened |
| 271 | ** |
| 272 | ** remove|rm|delete FILE ... |
| 273 | ** Remove unversioned files from the local repository. |
| 274 | ** Changes are not pushed to other repositories until |
| 275 | ** the next sync. |
| @@ -285,10 +286,11 @@ | |
| 285 | ** The remote account requires the 'y' capability. |
| 286 | ** |
| 287 | ** Options: |
| 288 | ** -v|--verbose Extra diagnostic output |
| 289 | ** -n|--dry-run Show what would have happened |
| 290 | ** |
| 291 | ** touch FILE ... Update the TIMESTAMP on all of the listed files |
| 292 | ** |
| 293 | ** Options: |
| 294 | ** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add", |
| 295 |
| --- src/unversioned.c | |
| +++ src/unversioned.c | |
| @@ -266,10 +266,11 @@ | |
| 266 | ** URL. |
| 267 | ** |
| 268 | ** Options: |
| 269 | ** -v|--verbose Extra diagnostic output |
| 270 | ** -n|--dry-run Show what would have happened |
| 271 | ** --proxy PROXY Use the specified HTTP proxy |
| 272 | ** |
| 273 | ** remove|rm|delete FILE ... |
| 274 | ** Remove unversioned files from the local repository. |
| 275 | ** Changes are not pushed to other repositories until |
| 276 | ** the next sync. |
| @@ -285,10 +286,11 @@ | |
| 286 | ** The remote account requires the 'y' capability. |
| 287 | ** |
| 288 | ** Options: |
| 289 | ** -v|--verbose Extra diagnostic output |
| 290 | ** -n|--dry-run Show what would have happened |
| 291 | ** --proxy PROXY Use the specified HTTP proxy |
| 292 | ** |
| 293 | ** touch FILE ... Update the TIMESTAMP on all of the listed files |
| 294 | ** |
| 295 | ** Options: |
| 296 | ** --mtime TIMESTAMP Use TIMESTAMP instead of "now" for the "add", |
| 297 |
+1
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -101,10 +101,11 @@ | ||
| 101 | 101 | ** used for merging, named *-baseline, *-original, |
| 102 | 102 | ** and *-merge. |
| 103 | 103 | ** --latest Acceptable in place of VERSION, update to |
| 104 | 104 | ** latest version |
| 105 | 105 | ** --nosync Do not auto-sync prior to update |
| 106 | +** --proxy PROXY Use PROXY as http proxy during sync operation | |
| 106 | 107 | ** --setmtime Set timestamps of all files to match their |
| 107 | 108 | ** SCM-side times (the timestamp of the last |
| 108 | 109 | ** check-in which modified them). |
| 109 | 110 | ** -v|--verbose Print status information about all files |
| 110 | 111 | ** -W|--width WIDTH Width of lines (default is to auto-detect). |
| 111 | 112 | |
| 112 | 113 | ADDED www/title-test.md |
| 113 | 114 | ADDED www/title-test.wiki |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -101,10 +101,11 @@ | |
| 101 | ** used for merging, named *-baseline, *-original, |
| 102 | ** and *-merge. |
| 103 | ** --latest Acceptable in place of VERSION, update to |
| 104 | ** latest version |
| 105 | ** --nosync Do not auto-sync prior to update |
| 106 | ** --setmtime Set timestamps of all files to match their |
| 107 | ** SCM-side times (the timestamp of the last |
| 108 | ** check-in which modified them). |
| 109 | ** -v|--verbose Print status information about all files |
| 110 | ** -W|--width WIDTH Width of lines (default is to auto-detect). |
| 111 | |
| 112 | DDED www/title-test.md |
| 113 | DDED www/title-test.wiki |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -101,10 +101,11 @@ | |
| 101 | ** used for merging, named *-baseline, *-original, |
| 102 | ** and *-merge. |
| 103 | ** --latest Acceptable in place of VERSION, update to |
| 104 | ** latest version |
| 105 | ** --nosync Do not auto-sync prior to update |
| 106 | ** --proxy PROXY Use PROXY as http proxy during sync operation |
| 107 | ** --setmtime Set timestamps of all files to match their |
| 108 | ** SCM-side times (the timestamp of the last |
| 109 | ** check-in which modified them). |
| 110 | ** -v|--verbose Print status information about all files |
| 111 | ** -W|--width WIDTH Width of lines (default is to auto-detect). |
| 112 | |
| 113 | DDED www/title-test.md |
| 114 | DDED www/title-test.wiki |
+12
| --- a/www/title-test.md | ||
| +++ b/www/title-test.md | ||
| @@ -0,0 +1,12 @@ | ||
| 1 | +# Markdown Doc Title > & " ' < Test | |
| 2 | + | |
| 3 | +Test of unusual characters in the title of Markdown formatted documents. | |
| 4 | +The title should read: | |
| 5 | + | |
| 6 | +> Markdown Doc Title > & " ' < Test | |
| 7 | + | |
| 8 | +See also: | |
| 9 | + | |
| 10 | + * [](/doc/trunk/www/title-test.wiki) | |
| 11 | + * [](/wiki?name=Test+Wiki+>+%26+%22+%27+%3c+Title&p) | |
| 12 | + * [](/forumpost/481ab1f9) |
| --- a/www/title-test.md | |
| +++ b/www/title-test.md | |
| @@ -0,0 +1,12 @@ | |
| --- a/www/title-test.md | |
| +++ b/www/title-test.md | |
| @@ -0,0 +1,12 @@ | |
| 1 | # Markdown Doc Title > & " ' < Test |
| 2 | |
| 3 | Test of unusual characters in the title of Markdown formatted documents. |
| 4 | The title should read: |
| 5 | |
| 6 | > Markdown Doc Title > & " ' < Test |
| 7 | |
| 8 | See also: |
| 9 | |
| 10 | * [](/doc/trunk/www/title-test.wiki) |
| 11 | * [](/wiki?name=Test+Wiki+>+%26+%22+%27+%3c+Title&p) |
| 12 | * [](/forumpost/481ab1f9) |
+14
| --- a/www/title-test.wiki | ||
| +++ b/www/title-test.wiki | ||
| @@ -0,0 +1,14 @@ | ||
| 1 | +<title>Wiki Doc Title > & " ' < Test</title> | |
| 2 | + | |
| 3 | +Test of unusual characters in the title of Fossil-wiki formatted documents. | |
| 4 | +The title should read: | |
| 5 | + | |
| 6 | +<big><b><verbatim> | |
| 7 | + Wiki Doc Title > & " ' < Test | |
| 8 | +</verbatim></b></big> | |
| 9 | + | |
| 10 | +See also: | |
| 11 | + | |
| 12 | + * [/doc/trunk/www/title-test.md] | |
| 13 | + * [/wiki?name=Test+Wiki+>+%26+%22+%27+%3c+Title&p] | |
| 14 | + * [/forumpost/481ab1f9] |
| --- a/www/title-test.wiki | |
| +++ b/www/title-test.wiki | |
| @@ -0,0 +1,14 @@ | |
| --- a/www/title-test.wiki | |
| +++ b/www/title-test.wiki | |
| @@ -0,0 +1,14 @@ | |
| 1 | <title>Wiki Doc Title > & " ' < Test</title> |
| 2 | |
| 3 | Test of unusual characters in the title of Fossil-wiki formatted documents. |
| 4 | The title should read: |
| 5 | |
| 6 | <big><b><verbatim> |
| 7 | Wiki Doc Title > & " ' < Test |
| 8 | </verbatim></b></big> |
| 9 | |
| 10 | See also: |
| 11 | |
| 12 | * [/doc/trunk/www/title-test.md] |
| 13 | * [/wiki?name=Test+Wiki+>+%26+%22+%27+%3c+Title&p] |
| 14 | * [/forumpost/481ab1f9] |