Fossil SCM
Add preliminary documentation for interwiki links. List the intermap on the /md_rules and /wiki_rules pages.
Commit
1a4158ea86747320c337438168e242bead4c0ec733ecf74c49b6430c42f9bd7d
Parent
fa105da061b91b8…
8 files changed
+38
-6
+6
-6
+2
+5
-4
+1
-1
+104
+1
+2
+38
-6
| --- src/interwiki.c | ||
| +++ src/interwiki.c | ||
| @@ -131,21 +131,22 @@ | ||
| 131 | 131 | /* |
| 132 | 132 | ** COMMAND: interwiki* |
| 133 | 133 | ** |
| 134 | 134 | ** Usage: %fossil interwiki COMMAND ... |
| 135 | 135 | ** |
| 136 | -** Manage interwiki labels using the following commands: | |
| 136 | +** Manage the "intermap" that defines the mapping from interwiki tags | |
| 137 | +** to complete URLs for interwiki links. | |
| 137 | 138 | ** |
| 138 | -** > fossil interwiki delete NAME ... | |
| 139 | +** > fossil interwiki delete TAG ... | |
| 139 | 140 | ** |
| 140 | 141 | ** Delete one or more interwiki maps. |
| 141 | 142 | ** |
| 142 | -** > fossil interwiki edit NAME --base URL --hash PATH --wiki PATH | |
| 143 | +** > fossil interwiki edit TAG --base URL --hash PATH --wiki PATH | |
| 143 | 144 | ** |
| 144 | -** Create a interwiki referenced call NAME. The base URL is | |
| 145 | +** Create a interwiki referenced call TAG. The base URL is | |
| 145 | 146 | ** the --base option, which is required. The --hash and --wiki |
| 146 | -** paths are optional. The NAME must be lower-case alphanumeric | |
| 147 | +** paths are optional. The TAG must be lower-case alphanumeric | |
| 147 | 148 | ** and must be unique. A new entry is created if it does not |
| 148 | 149 | ** already exit. |
| 149 | 150 | ** |
| 150 | 151 | ** > fossil interwiki list |
| 151 | 152 | ** |
| @@ -164,11 +165,11 @@ | ||
| 164 | 165 | const char *zName; |
| 165 | 166 | const char *zBase = find_option("base",0,1); |
| 166 | 167 | const char *zHash = find_option("hash",0,1); |
| 167 | 168 | const char *zWiki = find_option("wiki",0,1); |
| 168 | 169 | verify_all_options(); |
| 169 | - if( g.argc!=4 ) usage("add NAME ?OPTIONS?"); | |
| 170 | + if( g.argc!=4 ) usage("add TAG ?OPTIONS?"); | |
| 170 | 171 | zName = g.argv[3]; |
| 171 | 172 | if( zBase){ |
| 172 | 173 | fossil_fatal("the --base option is required"); |
| 173 | 174 | } |
| 174 | 175 | if( !interwiki_valid_name(zName) ){ |
| @@ -231,5 +232,36 @@ | ||
| 231 | 232 | { |
| 232 | 233 | fossil_fatal("unknown command \"%s\" - should be one of: " |
| 233 | 234 | "delete edit list", zCmd); |
| 234 | 235 | } |
| 235 | 236 | } |
| 237 | + | |
| 238 | + | |
| 239 | +/* | |
| 240 | +** Append text to the "Markdown" or "Wiki" rules pages that shows | |
| 241 | +** a table of all interwiki tags available on this system. | |
| 242 | +*/ | |
| 243 | +void interwiki_append_map_table(Blob *out){ | |
| 244 | + int n = 0; | |
| 245 | + Stmt q; | |
| 246 | + db_prepare(&q, | |
| 247 | + "SELECT substr(name,11), json_extract(value,'$.base')" | |
| 248 | + " FROM config WHERE name glob 'interwiki:*'" | |
| 249 | + " ORDER BY name;" | |
| 250 | + ); | |
| 251 | + while( db_step(&q)==SQLITE_ROW ){ | |
| 252 | + if( n==0 ){ | |
| 253 | + blob_appendf(out, "<blockquote><table>\n"); | |
| 254 | + } | |
| 255 | + blob_appendf(out,"<tr><td>%h</td><td> → </td>", | |
| 256 | + db_column_text(&q,0)); | |
| 257 | + blob_appendf(out,"<td>%h</td></tr>\n", | |
| 258 | + db_column_text(&q,1)); | |
| 259 | + n++; | |
| 260 | + } | |
| 261 | + db_finalize(&q); | |
| 262 | + if( n>0 ){ | |
| 263 | + blob_appendf(out,"</table></blockquote>\n"); | |
| 264 | + }else{ | |
| 265 | + blob_appendf(out,"<i>None</i></blockquote>\n"); | |
| 266 | + } | |
| 267 | +} | |
| 236 | 268 |
| --- src/interwiki.c | |
| +++ src/interwiki.c | |
| @@ -131,21 +131,22 @@ | |
| 131 | /* |
| 132 | ** COMMAND: interwiki* |
| 133 | ** |
| 134 | ** Usage: %fossil interwiki COMMAND ... |
| 135 | ** |
| 136 | ** Manage interwiki labels using the following commands: |
| 137 | ** |
| 138 | ** > fossil interwiki delete NAME ... |
| 139 | ** |
| 140 | ** Delete one or more interwiki maps. |
| 141 | ** |
| 142 | ** > fossil interwiki edit NAME --base URL --hash PATH --wiki PATH |
| 143 | ** |
| 144 | ** Create a interwiki referenced call NAME. The base URL is |
| 145 | ** the --base option, which is required. The --hash and --wiki |
| 146 | ** paths are optional. The NAME must be lower-case alphanumeric |
| 147 | ** and must be unique. A new entry is created if it does not |
| 148 | ** already exit. |
| 149 | ** |
| 150 | ** > fossil interwiki list |
| 151 | ** |
| @@ -164,11 +165,11 @@ | |
| 164 | const char *zName; |
| 165 | const char *zBase = find_option("base",0,1); |
| 166 | const char *zHash = find_option("hash",0,1); |
| 167 | const char *zWiki = find_option("wiki",0,1); |
| 168 | verify_all_options(); |
| 169 | if( g.argc!=4 ) usage("add NAME ?OPTIONS?"); |
| 170 | zName = g.argv[3]; |
| 171 | if( zBase){ |
| 172 | fossil_fatal("the --base option is required"); |
| 173 | } |
| 174 | if( !interwiki_valid_name(zName) ){ |
| @@ -231,5 +232,36 @@ | |
| 231 | { |
| 232 | fossil_fatal("unknown command \"%s\" - should be one of: " |
| 233 | "delete edit list", zCmd); |
| 234 | } |
| 235 | } |
| 236 |
| --- src/interwiki.c | |
| +++ src/interwiki.c | |
| @@ -131,21 +131,22 @@ | |
| 131 | /* |
| 132 | ** COMMAND: interwiki* |
| 133 | ** |
| 134 | ** Usage: %fossil interwiki COMMAND ... |
| 135 | ** |
| 136 | ** Manage the "intermap" that defines the mapping from interwiki tags |
| 137 | ** to complete URLs for interwiki links. |
| 138 | ** |
| 139 | ** > fossil interwiki delete TAG ... |
| 140 | ** |
| 141 | ** Delete one or more interwiki maps. |
| 142 | ** |
| 143 | ** > fossil interwiki edit TAG --base URL --hash PATH --wiki PATH |
| 144 | ** |
| 145 | ** Create a interwiki referenced call TAG. The base URL is |
| 146 | ** the --base option, which is required. The --hash and --wiki |
| 147 | ** paths are optional. The TAG must be lower-case alphanumeric |
| 148 | ** and must be unique. A new entry is created if it does not |
| 149 | ** already exit. |
| 150 | ** |
| 151 | ** > fossil interwiki list |
| 152 | ** |
| @@ -164,11 +165,11 @@ | |
| 165 | const char *zName; |
| 166 | const char *zBase = find_option("base",0,1); |
| 167 | const char *zHash = find_option("hash",0,1); |
| 168 | const char *zWiki = find_option("wiki",0,1); |
| 169 | verify_all_options(); |
| 170 | if( g.argc!=4 ) usage("add TAG ?OPTIONS?"); |
| 171 | zName = g.argv[3]; |
| 172 | if( zBase){ |
| 173 | fossil_fatal("the --base option is required"); |
| 174 | } |
| 175 | if( !interwiki_valid_name(zName) ){ |
| @@ -231,5 +232,36 @@ | |
| 232 | { |
| 233 | fossil_fatal("unknown command \"%s\" - should be one of: " |
| 234 | "delete edit list", zCmd); |
| 235 | } |
| 236 | } |
| 237 | |
| 238 | |
| 239 | /* |
| 240 | ** Append text to the "Markdown" or "Wiki" rules pages that shows |
| 241 | ** a table of all interwiki tags available on this system. |
| 242 | */ |
| 243 | void interwiki_append_map_table(Blob *out){ |
| 244 | int n = 0; |
| 245 | Stmt q; |
| 246 | db_prepare(&q, |
| 247 | "SELECT substr(name,11), json_extract(value,'$.base')" |
| 248 | " FROM config WHERE name glob 'interwiki:*'" |
| 249 | " ORDER BY name;" |
| 250 | ); |
| 251 | while( db_step(&q)==SQLITE_ROW ){ |
| 252 | if( n==0 ){ |
| 253 | blob_appendf(out, "<blockquote><table>\n"); |
| 254 | } |
| 255 | blob_appendf(out,"<tr><td>%h</td><td> → </td>", |
| 256 | db_column_text(&q,0)); |
| 257 | blob_appendf(out,"<td>%h</td></tr>\n", |
| 258 | db_column_text(&q,1)); |
| 259 | n++; |
| 260 | } |
| 261 | db_finalize(&q); |
| 262 | if( n>0 ){ |
| 263 | blob_appendf(out,"</table></blockquote>\n"); |
| 264 | }else{ |
| 265 | blob_appendf(out,"<i>None</i></blockquote>\n"); |
| 266 | } |
| 267 | } |
| 268 |
+6
-6
| --- src/markdown.md | ||
| +++ src/markdown.md | ||
| @@ -44,15 +44,16 @@ | ||
| 44 | 44 | > it may optionally be written **\<URL\>** (format 4). |
| 45 | 45 | > Other **URL** formats include: |
| 46 | 46 | > <ul> |
| 47 | 47 | > <li> A relative pathname. |
| 48 | 48 | > <li> A pathname starting with "/" in which case the Fossil server |
| 49 | -> URL prefix is prepended | |
| 49 | +> URL prefix is prepended | |
| 50 | 50 | > <li> A wiki page name, or a wiki page name preceded by "wiki:" |
| 51 | -> <li> An artifact or ticket hash or hash prefix | |
| 51 | +> <li> An artifact or ticket hash or hash prefix | |
| 52 | 52 | > <li> A date and time stamp: "YYYY-MM-DD HH:MM:SS" or a subset that |
| 53 | -> includes at least the day of the month.</ul> | |
| 53 | +> includes at least the day of the month. | |
| 54 | +> <li> An [interwiki link](#intermap) of the form "<i>Tag</i><b>:</b><i>PageName</i>"</ul> | |
| 54 | 55 | |
| 55 | 56 | > In format 8, then the URL becomes the display text. This is useful for |
| 56 | 57 | > hyperlinks that refer to wiki pages and check-in and ticket hashes. |
| 57 | 58 | |
| 58 | 59 | ## Fonts ## |
| @@ -153,8 +154,7 @@ | ||
| 153 | 154 | > the heading is omitted from the body of the document and becomes the |
| 154 | 155 | > document title displayed at the top of the Fossil page. |
| 155 | 156 | |
| 156 | 157 | [daringfireball.net]: http://daringfireball.net/projects/markdown/syntax |
| 157 | 158 | |
| 158 | -## See also: | |
| 159 | - | |
| 160 | - * [Fossil Wiki Formatting Rules](/wiki_rules) | |
| 159 | +<a name="intermap"></a> | |
| 160 | +## Interwiki Tag Map | |
| 161 | 161 |
| --- src/markdown.md | |
| +++ src/markdown.md | |
| @@ -44,15 +44,16 @@ | |
| 44 | > it may optionally be written **\<URL\>** (format 4). |
| 45 | > Other **URL** formats include: |
| 46 | > <ul> |
| 47 | > <li> A relative pathname. |
| 48 | > <li> A pathname starting with "/" in which case the Fossil server |
| 49 | > URL prefix is prepended |
| 50 | > <li> A wiki page name, or a wiki page name preceded by "wiki:" |
| 51 | > <li> An artifact or ticket hash or hash prefix |
| 52 | > <li> A date and time stamp: "YYYY-MM-DD HH:MM:SS" or a subset that |
| 53 | > includes at least the day of the month.</ul> |
| 54 | |
| 55 | > In format 8, then the URL becomes the display text. This is useful for |
| 56 | > hyperlinks that refer to wiki pages and check-in and ticket hashes. |
| 57 | |
| 58 | ## Fonts ## |
| @@ -153,8 +154,7 @@ | |
| 153 | > the heading is omitted from the body of the document and becomes the |
| 154 | > document title displayed at the top of the Fossil page. |
| 155 | |
| 156 | [daringfireball.net]: http://daringfireball.net/projects/markdown/syntax |
| 157 | |
| 158 | ## See also: |
| 159 | |
| 160 | * [Fossil Wiki Formatting Rules](/wiki_rules) |
| 161 |
| --- src/markdown.md | |
| +++ src/markdown.md | |
| @@ -44,15 +44,16 @@ | |
| 44 | > it may optionally be written **\<URL\>** (format 4). |
| 45 | > Other **URL** formats include: |
| 46 | > <ul> |
| 47 | > <li> A relative pathname. |
| 48 | > <li> A pathname starting with "/" in which case the Fossil server |
| 49 | > URL prefix is prepended |
| 50 | > <li> A wiki page name, or a wiki page name preceded by "wiki:" |
| 51 | > <li> An artifact or ticket hash or hash prefix |
| 52 | > <li> A date and time stamp: "YYYY-MM-DD HH:MM:SS" or a subset that |
| 53 | > includes at least the day of the month. |
| 54 | > <li> An [interwiki link](#intermap) of the form "<i>Tag</i><b>:</b><i>PageName</i>"</ul> |
| 55 | |
| 56 | > In format 8, then the URL becomes the display text. This is useful for |
| 57 | > hyperlinks that refer to wiki pages and check-in and ticket hashes. |
| 58 | |
| 59 | ## Fonts ## |
| @@ -153,8 +154,7 @@ | |
| 154 | > the heading is omitted from the body of the document and becomes the |
| 155 | > document title displayed at the top of the Fossil page. |
| 156 | |
| 157 | [daringfireball.net]: http://daringfireball.net/projects/markdown/syntax |
| 158 | |
| 159 | <a name="intermap"></a> |
| 160 | ## Interwiki Tag Map |
| 161 |
+2
| --- src/wiki.c | ||
| +++ src/wiki.c | ||
| @@ -223,10 +223,11 @@ | ||
| 223 | 223 | style_submenu_element("Plain-Text", "%R/md_rules?txt=1"); |
| 224 | 224 | } |
| 225 | 225 | style_submenu_element("Wiki", "%R/wiki_rules"); |
| 226 | 226 | blob_init(&x, builtin_text("markdown.md"), -1); |
| 227 | 227 | blob_materialize(&x); |
| 228 | + interwiki_append_map_table(&x); | |
| 228 | 229 | safe_html_context(DOCSRC_TRUSTED); |
| 229 | 230 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown"); |
| 230 | 231 | blob_reset(&x); |
| 231 | 232 | style_footer(); |
| 232 | 233 | } |
| @@ -246,10 +247,11 @@ | ||
| 246 | 247 | style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1"); |
| 247 | 248 | } |
| 248 | 249 | style_submenu_element("Markdown","%R/md_rules"); |
| 249 | 250 | blob_init(&x, builtin_text("wiki.wiki"), -1); |
| 250 | 251 | blob_materialize(&x); |
| 252 | + interwiki_append_map_table(&x); | |
| 251 | 253 | safe_html_context(DOCSRC_TRUSTED); |
| 252 | 254 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki"); |
| 253 | 255 | blob_reset(&x); |
| 254 | 256 | style_footer(); |
| 255 | 257 | } |
| 256 | 258 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -223,10 +223,11 @@ | |
| 223 | style_submenu_element("Plain-Text", "%R/md_rules?txt=1"); |
| 224 | } |
| 225 | style_submenu_element("Wiki", "%R/wiki_rules"); |
| 226 | blob_init(&x, builtin_text("markdown.md"), -1); |
| 227 | blob_materialize(&x); |
| 228 | safe_html_context(DOCSRC_TRUSTED); |
| 229 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown"); |
| 230 | blob_reset(&x); |
| 231 | style_footer(); |
| 232 | } |
| @@ -246,10 +247,11 @@ | |
| 246 | style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1"); |
| 247 | } |
| 248 | style_submenu_element("Markdown","%R/md_rules"); |
| 249 | blob_init(&x, builtin_text("wiki.wiki"), -1); |
| 250 | blob_materialize(&x); |
| 251 | safe_html_context(DOCSRC_TRUSTED); |
| 252 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki"); |
| 253 | blob_reset(&x); |
| 254 | style_footer(); |
| 255 | } |
| 256 |
| --- src/wiki.c | |
| +++ src/wiki.c | |
| @@ -223,10 +223,11 @@ | |
| 223 | style_submenu_element("Plain-Text", "%R/md_rules?txt=1"); |
| 224 | } |
| 225 | style_submenu_element("Wiki", "%R/wiki_rules"); |
| 226 | blob_init(&x, builtin_text("markdown.md"), -1); |
| 227 | blob_materialize(&x); |
| 228 | interwiki_append_map_table(&x); |
| 229 | safe_html_context(DOCSRC_TRUSTED); |
| 230 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-markdown"); |
| 231 | blob_reset(&x); |
| 232 | style_footer(); |
| 233 | } |
| @@ -246,10 +247,11 @@ | |
| 247 | style_submenu_element("Plain-Text", "%R/wiki_rules?txt=1"); |
| 248 | } |
| 249 | style_submenu_element("Markdown","%R/md_rules"); |
| 250 | blob_init(&x, builtin_text("wiki.wiki"), -1); |
| 251 | blob_materialize(&x); |
| 252 | interwiki_append_map_table(&x); |
| 253 | safe_html_context(DOCSRC_TRUSTED); |
| 254 | wiki_render_by_mimetype(&x, fTxt ? "text/plain" : "text/x-fossil-wiki"); |
| 255 | blob_reset(&x); |
| 256 | style_footer(); |
| 257 | } |
| 258 |
+5
-4
| --- src/wiki.wiki | ||
| +++ src/wiki.wiki | ||
| @@ -43,11 +43,13 @@ | ||
| 43 | 43 | Use HTML for deeper indentation. |
| 44 | 44 | |
| 45 | 45 | 5. <b>Hyperlinks.</b> |
| 46 | 46 | Text within square brackets <nowiki>("[...]")</nowiki> becomes a |
| 47 | 47 | hyperlink. The target can be a wiki page name, the artifact ID of |
| 48 | - a check-in or ticket, the name of an image, or a URL. | |
| 48 | + a check-in or ticket, the name of an image, a URL, or an | |
| 49 | + [#intermap|interwiki link] of the form | |
| 50 | + "<i>Tag</i><b>:</b><i>PageName</i>". | |
| 49 | 51 | By default, the target is displayed as the text of the hyperlink. |
| 50 | 52 | But you can specify alternative text after the target name |
| 51 | 53 | separated by a "|" character. |
| 52 | 54 | You can also link to internal anchor names using |
| 53 | 55 | <nowiki>[#anchor-name],</nowiki> providing you have added the necessary |
| @@ -78,8 +80,7 @@ | ||
| 78 | 80 | The <nowiki> tag disables all wiki formatting rules through |
| 79 | 81 | the matching </nowiki> element. The <verbatim> tag works |
| 80 | 82 | like <pre> with the addition that it also disables all wiki |
| 81 | 83 | and HTML markup through the matching </verbatim>. |
| 82 | 84 | |
| 83 | -<h2>See Also</h2> | |
| 84 | - | |
| 85 | - * [/md_rules|Markdown formatting rules] | |
| 85 | +<a name="intermap"></a> | |
| 86 | +<h2>Interwiki Tag Map</h2> | |
| 86 | 87 |
| --- src/wiki.wiki | |
| +++ src/wiki.wiki | |
| @@ -43,11 +43,13 @@ | |
| 43 | Use HTML for deeper indentation. |
| 44 | |
| 45 | 5. <b>Hyperlinks.</b> |
| 46 | Text within square brackets <nowiki>("[...]")</nowiki> becomes a |
| 47 | hyperlink. The target can be a wiki page name, the artifact ID of |
| 48 | a check-in or ticket, the name of an image, or a URL. |
| 49 | By default, the target is displayed as the text of the hyperlink. |
| 50 | But you can specify alternative text after the target name |
| 51 | separated by a "|" character. |
| 52 | You can also link to internal anchor names using |
| 53 | <nowiki>[#anchor-name],</nowiki> providing you have added the necessary |
| @@ -78,8 +80,7 @@ | |
| 78 | The <nowiki> tag disables all wiki formatting rules through |
| 79 | the matching </nowiki> element. The <verbatim> tag works |
| 80 | like <pre> with the addition that it also disables all wiki |
| 81 | and HTML markup through the matching </verbatim>. |
| 82 | |
| 83 | <h2>See Also</h2> |
| 84 | |
| 85 | * [/md_rules|Markdown formatting rules] |
| 86 |
| --- src/wiki.wiki | |
| +++ src/wiki.wiki | |
| @@ -43,11 +43,13 @@ | |
| 43 | Use HTML for deeper indentation. |
| 44 | |
| 45 | 5. <b>Hyperlinks.</b> |
| 46 | Text within square brackets <nowiki>("[...]")</nowiki> becomes a |
| 47 | hyperlink. The target can be a wiki page name, the artifact ID of |
| 48 | a check-in or ticket, the name of an image, a URL, or an |
| 49 | [#intermap|interwiki link] of the form |
| 50 | "<i>Tag</i><b>:</b><i>PageName</i>". |
| 51 | By default, the target is displayed as the text of the hyperlink. |
| 52 | But you can specify alternative text after the target name |
| 53 | separated by a "|" character. |
| 54 | You can also link to internal anchor names using |
| 55 | <nowiki>[#anchor-name],</nowiki> providing you have added the necessary |
| @@ -78,8 +80,7 @@ | |
| 80 | The <nowiki> tag disables all wiki formatting rules through |
| 81 | the matching </nowiki> element. The <verbatim> tag works |
| 82 | like <pre> with the addition that it also disables all wiki |
| 83 | and HTML markup through the matching </verbatim>. |
| 84 | |
| 85 | <a name="intermap"></a> |
| 86 | <h2>Interwiki Tag Map</h2> |
| 87 |
+1
-1
| --- www/changes.wiki | ||
| +++ www/changes.wiki | ||
| @@ -1,11 +1,11 @@ | ||
| 1 | 1 | <title>Change Log</title> |
| 2 | 2 | |
| 3 | 3 | <a name='v2_13'></a> |
| 4 | 4 | <h2>Changes for Version 2.13 (pending)</h2> |
| 5 | 5 | |
| 6 | - * <i>TBD...</i> | |
| 6 | + * Added support for [./interwiki.md|interwiki links]. | |
| 7 | 7 | |
| 8 | 8 | <a name='v2_12'></a> |
| 9 | 9 | <h2>Changes for Version 2.12.1 (2020-08-20)</h2> |
| 10 | 10 | |
| 11 | 11 | * (2.12.1): Fix client-side vulnerabilities discovered by Max Justicz. |
| 12 | 12 | |
| 13 | 13 | ADDED www/interwiki.md |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,11 +1,11 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <a name='v2_13'></a> |
| 4 | <h2>Changes for Version 2.13 (pending)</h2> |
| 5 | |
| 6 | * <i>TBD...</i> |
| 7 | |
| 8 | <a name='v2_12'></a> |
| 9 | <h2>Changes for Version 2.12.1 (2020-08-20)</h2> |
| 10 | |
| 11 | * (2.12.1): Fix client-side vulnerabilities discovered by Max Justicz. |
| 12 | |
| 13 | DDED www/interwiki.md |
| --- www/changes.wiki | |
| +++ www/changes.wiki | |
| @@ -1,11 +1,11 @@ | |
| 1 | <title>Change Log</title> |
| 2 | |
| 3 | <a name='v2_13'></a> |
| 4 | <h2>Changes for Version 2.13 (pending)</h2> |
| 5 | |
| 6 | * Added support for [./interwiki.md|interwiki links]. |
| 7 | |
| 8 | <a name='v2_12'></a> |
| 9 | <h2>Changes for Version 2.12.1 (2020-08-20)</h2> |
| 10 | |
| 11 | * (2.12.1): Fix client-side vulnerabilities discovered by Max Justicz. |
| 12 | |
| 13 | DDED www/interwiki.md |
+104
| --- a/www/interwiki.md | ||
| +++ b/www/interwiki.md | ||
| @@ -0,0 +1,104 @@ | ||
| 1 | +Interwiki_links) | |
| 2 | + * [](httInterwiki_links) | |
| 3 | + | |
| 4 | +Another example: The Fossil Forum is hosted in a separate repository | |
| 5 | +from the Fossil source code. This page is part of the | |
| 6 | +source code repository. Interwiki links can be used to more easily | |
| 7 | +refer to the forum repository: | |
| 8 | + | |
| 9 | + * [](forum:d5508c3bf44c6393df09c) | |
| 10 | + * [](https://fossil-scm.org/forum/info/d5508c3bf44c6393df09c) | |
| 11 | + | |
| 12 | +## Advantages Over Full URL Targets | |
| 13 | + | |
| 14 | + * Interwiki links are easier to write. There is less typing, | |
| 15 | + and fewer op?cmd=ortunities to make mistakes. | |
| 16 | + | |
| 17 | + * Interwiki links are easier to read. With well-chosen | |
| 18 | + intermap tags, the links are easier to understand. | |
| 19 | + | |
| 20 | + * Interwiki links continue to work after a domain change on the | |
| 21 | + target. If the target of a link moves to a different domain, | |
| 22 | + an interwiki link will continue to work, if the intermap is adjusted, | |
| 23 | + but a hard-coded link will be permanently broken. | |
| 24 | + | |
| 25 | + * Interwiki links allow clones to use a different target domain from the | |
| 26 | + original repository. | |
| 27 | + | |
| 28 | +## Details | |
| 29 | + | |
| 30 | +Fossil supports interwiki links in both the | |
| 31 | +[Fossil Wiki](/wiki_rules) and [Markdown](/md_rules) markup | |
| 32 | +styles. An interwiki link consists of a tag followed by a colon | |
| 33 | +and the link target: | |
| 34 | + | |
| 35 | +> <i>Tag</i><b>:</b><i>PageName</i> | |
| 36 | + | |
| 37 | +The Tag must consist of ASCII alphanumeric characters only - no | |
| 38 | +punctuation or whitespace or characters greater than U+007A. | |
| 39 | +The PageName is the link notation on the target wiki. | |
| 40 | +Th different classes of PageNames are recognized by Fossil: | |
| 41 | + | |
| 42 | + 1. <b>Path Links</b> → the PageName begins with the "/" character | |
| 43 | + or is an empty string. | |
| 44 | + | |
| 45 | + 2. <b>Hash Links</b> → the PageName is a hexadecimal number with | |
| 46 | + at least four digits. | |
| 47 | + | |
| 48 | + n 3. <b>Wiki Links</b> → A PageName that is not a Path or Hash. | |
| 49 | + | |
| 50 | +The Intermap defiisg. Path links are appended | |
| 51 | +directly to the URL contained in the Intermap. The Intermap can define | |
| 52 | +additional text to put in between the base URL and the PageName for | |
| 53 | +Hash and Wiki links, respectively. | |
| 54 | + | |
| 55 | +<a id="intermap"></a> | |
| 56 | +## Intermap | |
| 57 | + | |
| 58 | +The intermap defines a mapping from interwiki Tags to full URLs. The | |
| 59 | +Intermap can be viewed and managed using the [fossil s. fors) markup | |
| 60 | +styles. An interwiki link consists of a tag followed by a colon | |
| 61 | +and the link tanameet: | |
| 62 | + | |
| 63 | +> <i>Tag</i><b>:</b><i>PageName</i> | |
| 64 | + | |
| 65 | +The Tag must consist of ASCII alphanumeric characters only - no | |
| 66 | +punctuation or whitespace or characters greater than U+007A. | |
| 67 | +The PageName is the link notation on the targeiki link willhelp?cmd=/intermapki links in both the | |
| 68 | +[Fossil Wiki](/wiki_rules) and [Markdown](/md_rules) markup | |
| 69 | +styles. An interwiki link consists of a tag followed by a colon | |
| 70 | +and the link target: | |
| 71 | + | |
| 72 | +> <i>Tag</i><b>:</b><i>PageName</i> | |
| 73 | + | |
| 74 | +The Tag must consist of ASCII alphanumeric characters only - no | |
| 75 | +punctuation or whitespace or characters greater than U+007A. | |
| 76 | +The PageName is the link notation on the target wiki. | |
| 77 | +Three different classes of PageNames are recognized by Fossil: | |
| 78 | + | |
| 79 | + 1. <b>Path Links</b> → the PageName begins with the "/" character | |
| 80 | + or is an empty string. | |
| 81 | + | |
| 82 | + 2. <b>Hash Links</b> → the PageName is a hexadecimal number with | |
| 83 | + at least four digits. | |
| 84 | + | |
| 85 | + n 3. <b>Wiki Links</b> → A PageName that is not a Path or Hash. | |
| 86 | + | |
| 87 | +The Intermap defines a base URL for each Tag. Path links are appended | |
| 88 | +directly to the URL contained in the Intermap. The Intermap can define | |
| 89 | +additional text to put in between the base URL and the PageName for | |
| 90 | +Hash and Wiki links, respectively. | |
| 91 | + | |
| 92 | +<a id="intermap"></a> | |
| 93 | +## Intermap | |
| 94 | + | |
| 95 | +The intermap defines a mapping from interwiki Tags to full URLs. The | |
| 96 | +Intermap can be viewed and managed using the [fossil s. fors) markup | |
| 97 | +styles. An interwiki link consists of a tag followed by a colon | |
| 98 | +and the link tanameet: | |
| 99 | + | |
| 100 | +> <i>Tag</i><b>:</b><i>PageName</i> | |
| 101 | + | |
| 102 | +The Tag must consist of ASCII alphanumeric characters only - no | |
| 103 | +punctuation or whitespace or characters greater than U+007A. | |
| 104 | +The PageName is the link notation on knowing scanning the source |
| --- a/www/interwiki.md | |
| +++ b/www/interwiki.md | |
| @@ -0,0 +1,104 @@ | |
| --- a/www/interwiki.md | |
| +++ b/www/interwiki.md | |
| @@ -0,0 +1,104 @@ | |
| 1 | Interwiki_links) |
| 2 | * [](httInterwiki_links) |
| 3 | |
| 4 | Another example: The Fossil Forum is hosted in a separate repository |
| 5 | from the Fossil source code. This page is part of the |
| 6 | source code repository. Interwiki links can be used to more easily |
| 7 | refer to the forum repository: |
| 8 | |
| 9 | * [](forum:d5508c3bf44c6393df09c) |
| 10 | * [](https://fossil-scm.org/forum/info/d5508c3bf44c6393df09c) |
| 11 | |
| 12 | ## Advantages Over Full URL Targets |
| 13 | |
| 14 | * Interwiki links are easier to write. There is less typing, |
| 15 | and fewer op?cmd=ortunities to make mistakes. |
| 16 | |
| 17 | * Interwiki links are easier to read. With well-chosen |
| 18 | intermap tags, the links are easier to understand. |
| 19 | |
| 20 | * Interwiki links continue to work after a domain change on the |
| 21 | target. If the target of a link moves to a different domain, |
| 22 | an interwiki link will continue to work, if the intermap is adjusted, |
| 23 | but a hard-coded link will be permanently broken. |
| 24 | |
| 25 | * Interwiki links allow clones to use a different target domain from the |
| 26 | original repository. |
| 27 | |
| 28 | ## Details |
| 29 | |
| 30 | Fossil supports interwiki links in both the |
| 31 | [Fossil Wiki](/wiki_rules) and [Markdown](/md_rules) markup |
| 32 | styles. An interwiki link consists of a tag followed by a colon |
| 33 | and the link target: |
| 34 | |
| 35 | > <i>Tag</i><b>:</b><i>PageName</i> |
| 36 | |
| 37 | The Tag must consist of ASCII alphanumeric characters only - no |
| 38 | punctuation or whitespace or characters greater than U+007A. |
| 39 | The PageName is the link notation on the target wiki. |
| 40 | Th different classes of PageNames are recognized by Fossil: |
| 41 | |
| 42 | 1. <b>Path Links</b> → the PageName begins with the "/" character |
| 43 | or is an empty string. |
| 44 | |
| 45 | 2. <b>Hash Links</b> → the PageName is a hexadecimal number with |
| 46 | at least four digits. |
| 47 | |
| 48 | n 3. <b>Wiki Links</b> → A PageName that is not a Path or Hash. |
| 49 | |
| 50 | The Intermap defiisg. Path links are appended |
| 51 | directly to the URL contained in the Intermap. The Intermap can define |
| 52 | additional text to put in between the base URL and the PageName for |
| 53 | Hash and Wiki links, respectively. |
| 54 | |
| 55 | <a id="intermap"></a> |
| 56 | ## Intermap |
| 57 | |
| 58 | The intermap defines a mapping from interwiki Tags to full URLs. The |
| 59 | Intermap can be viewed and managed using the [fossil s. fors) markup |
| 60 | styles. An interwiki link consists of a tag followed by a colon |
| 61 | and the link tanameet: |
| 62 | |
| 63 | > <i>Tag</i><b>:</b><i>PageName</i> |
| 64 | |
| 65 | The Tag must consist of ASCII alphanumeric characters only - no |
| 66 | punctuation or whitespace or characters greater than U+007A. |
| 67 | The PageName is the link notation on the targeiki link willhelp?cmd=/intermapki links in both the |
| 68 | [Fossil Wiki](/wiki_rules) and [Markdown](/md_rules) markup |
| 69 | styles. An interwiki link consists of a tag followed by a colon |
| 70 | and the link target: |
| 71 | |
| 72 | > <i>Tag</i><b>:</b><i>PageName</i> |
| 73 | |
| 74 | The Tag must consist of ASCII alphanumeric characters only - no |
| 75 | punctuation or whitespace or characters greater than U+007A. |
| 76 | The PageName is the link notation on the target wiki. |
| 77 | Three different classes of PageNames are recognized by Fossil: |
| 78 | |
| 79 | 1. <b>Path Links</b> → the PageName begins with the "/" character |
| 80 | or is an empty string. |
| 81 | |
| 82 | 2. <b>Hash Links</b> → the PageName is a hexadecimal number with |
| 83 | at least four digits. |
| 84 | |
| 85 | n 3. <b>Wiki Links</b> → A PageName that is not a Path or Hash. |
| 86 | |
| 87 | The Intermap defines a base URL for each Tag. Path links are appended |
| 88 | directly to the URL contained in the Intermap. The Intermap can define |
| 89 | additional text to put in between the base URL and the PageName for |
| 90 | Hash and Wiki links, respectively. |
| 91 | |
| 92 | <a id="intermap"></a> |
| 93 | ## Intermap |
| 94 | |
| 95 | The intermap defines a mapping from interwiki Tags to full URLs. The |
| 96 | Intermap can be viewed and managed using the [fossil s. fors) markup |
| 97 | styles. An interwiki link consists of a tag followed by a colon |
| 98 | and the link tanameet: |
| 99 | |
| 100 | > <i>Tag</i><b>:</b><i>PageName</i> |
| 101 | |
| 102 | The Tag must consist of ASCII alphanumeric characters only - no |
| 103 | punctuation or whitespace or characters greater than U+007A. |
| 104 | The PageName is the link notation on knowing scanning the source |
+1
| --- www/mkindex.tcl | ||
| +++ www/mkindex.tcl | ||
| @@ -61,10 +61,11 @@ | ||
| 61 | 61 | /help {Lists of Commands and Webpages} |
| 62 | 62 | hints.wiki {Fossil Tips And Usage Hints} |
| 63 | 63 | history.md {The Purpose And History Of Fossil} |
| 64 | 64 | index.wiki {Home Page} |
| 65 | 65 | inout.wiki {Import And Export To And From Git} |
| 66 | + interwiki.md {Interwiki Links} | |
| 66 | 67 | image-format-vs-repo-size.md {Image Format vs Fossil Repo Size} |
| 67 | 68 | javascript.md {Use of JavaScript in Fossil} |
| 68 | 69 | makefile.wiki {The Fossil Build Process} |
| 69 | 70 | mirrorlimitations.md {Limitations On Git Mirrors} |
| 70 | 71 | mirrortogithub.md {How To Mirror A Fossil Repository On GitHub} |
| 71 | 72 |
| --- www/mkindex.tcl | |
| +++ www/mkindex.tcl | |
| @@ -61,10 +61,11 @@ | |
| 61 | /help {Lists of Commands and Webpages} |
| 62 | hints.wiki {Fossil Tips And Usage Hints} |
| 63 | history.md {The Purpose And History Of Fossil} |
| 64 | index.wiki {Home Page} |
| 65 | inout.wiki {Import And Export To And From Git} |
| 66 | image-format-vs-repo-size.md {Image Format vs Fossil Repo Size} |
| 67 | javascript.md {Use of JavaScript in Fossil} |
| 68 | makefile.wiki {The Fossil Build Process} |
| 69 | mirrorlimitations.md {Limitations On Git Mirrors} |
| 70 | mirrortogithub.md {How To Mirror A Fossil Repository On GitHub} |
| 71 |
| --- www/mkindex.tcl | |
| +++ www/mkindex.tcl | |
| @@ -61,10 +61,11 @@ | |
| 61 | /help {Lists of Commands and Webpages} |
| 62 | hints.wiki {Fossil Tips And Usage Hints} |
| 63 | history.md {The Purpose And History Of Fossil} |
| 64 | index.wiki {Home Page} |
| 65 | inout.wiki {Import And Export To And From Git} |
| 66 | interwiki.md {Interwiki Links} |
| 67 | image-format-vs-repo-size.md {Image Format vs Fossil Repo Size} |
| 68 | javascript.md {Use of JavaScript in Fossil} |
| 69 | makefile.wiki {The Fossil Build Process} |
| 70 | mirrorlimitations.md {Limitations On Git Mirrors} |
| 71 | mirrortogithub.md {How To Mirror A Fossil Repository On GitHub} |
| 72 |
| --- www/permutedindex.html | ||
| +++ www/permutedindex.html | ||
| @@ -184,14 +184,16 @@ | ||
| 184 | 184 | <li><a href="inout.wiki"><b>Import And Export To And From Git</b></a></li> |
| 185 | 185 | <li><a href="build.wiki">Installing Fossil — Compiling and</a></li> |
| 186 | 186 | <li><a href="fossil-from-msvc.wiki"><b>Integrating Fossil in the Microsoft Express 2010 IDE</b></a></li> |
| 187 | 187 | <li><a href="selfcheck.wiki">Integrity Self Checks — Fossil Repository</a></li> |
| 188 | 188 | <li><a href="webui.wiki">Interface — The Fossil Web</a></li> |
| 189 | +<li><a href="interwiki.md"><b>Interwiki Links</b></a></li> | |
| 189 | 190 | <li><a href="javascript.md">JavaScript in Fossil — Use of</a></li> |
| 190 | 191 | <li><a href="th1.md">Language — The TH1 Scripting</a></li> |
| 191 | 192 | <li><a href="copyright-release.html">License Agreement — Contributor</a></li> |
| 192 | 193 | <li><a href="mirrorlimitations.md"><b>Limitations On Git Mirrors</b></a></li> |
| 194 | +<li><a href="interwiki.md">Links — Interwiki</a></li> | |
| 193 | 195 | <li><a href="../../../help"><b>Lists of Commands and Webpages</b></a></li> |
| 194 | 196 | <li><a href="password.wiki">Management And Authentication — Password</a></li> |
| 195 | 197 | <li><a href="../../../sitemap">Map — Site</a></li> |
| 196 | 198 | <li><a href="../../../md_rules"><b>Markdown Formatting Rules</b></a></li> |
| 197 | 199 | <li><a href="backoffice.md">mechanism of Fossil — The Backoffice</a></li> |
| 198 | 200 |
| --- www/permutedindex.html | |
| +++ www/permutedindex.html | |
| @@ -184,14 +184,16 @@ | |
| 184 | <li><a href="inout.wiki"><b>Import And Export To And From Git</b></a></li> |
| 185 | <li><a href="build.wiki">Installing Fossil — Compiling and</a></li> |
| 186 | <li><a href="fossil-from-msvc.wiki"><b>Integrating Fossil in the Microsoft Express 2010 IDE</b></a></li> |
| 187 | <li><a href="selfcheck.wiki">Integrity Self Checks — Fossil Repository</a></li> |
| 188 | <li><a href="webui.wiki">Interface — The Fossil Web</a></li> |
| 189 | <li><a href="javascript.md">JavaScript in Fossil — Use of</a></li> |
| 190 | <li><a href="th1.md">Language — The TH1 Scripting</a></li> |
| 191 | <li><a href="copyright-release.html">License Agreement — Contributor</a></li> |
| 192 | <li><a href="mirrorlimitations.md"><b>Limitations On Git Mirrors</b></a></li> |
| 193 | <li><a href="../../../help"><b>Lists of Commands and Webpages</b></a></li> |
| 194 | <li><a href="password.wiki">Management And Authentication — Password</a></li> |
| 195 | <li><a href="../../../sitemap">Map — Site</a></li> |
| 196 | <li><a href="../../../md_rules"><b>Markdown Formatting Rules</b></a></li> |
| 197 | <li><a href="backoffice.md">mechanism of Fossil — The Backoffice</a></li> |
| 198 |
| --- www/permutedindex.html | |
| +++ www/permutedindex.html | |
| @@ -184,14 +184,16 @@ | |
| 184 | <li><a href="inout.wiki"><b>Import And Export To And From Git</b></a></li> |
| 185 | <li><a href="build.wiki">Installing Fossil — Compiling and</a></li> |
| 186 | <li><a href="fossil-from-msvc.wiki"><b>Integrating Fossil in the Microsoft Express 2010 IDE</b></a></li> |
| 187 | <li><a href="selfcheck.wiki">Integrity Self Checks — Fossil Repository</a></li> |
| 188 | <li><a href="webui.wiki">Interface — The Fossil Web</a></li> |
| 189 | <li><a href="interwiki.md"><b>Interwiki Links</b></a></li> |
| 190 | <li><a href="javascript.md">JavaScript in Fossil — Use of</a></li> |
| 191 | <li><a href="th1.md">Language — The TH1 Scripting</a></li> |
| 192 | <li><a href="copyright-release.html">License Agreement — Contributor</a></li> |
| 193 | <li><a href="mirrorlimitations.md"><b>Limitations On Git Mirrors</b></a></li> |
| 194 | <li><a href="interwiki.md">Links — Interwiki</a></li> |
| 195 | <li><a href="../../../help"><b>Lists of Commands and Webpages</b></a></li> |
| 196 | <li><a href="password.wiki">Management And Authentication — Password</a></li> |
| 197 | <li><a href="../../../sitemap">Map — Site</a></li> |
| 198 | <li><a href="../../../md_rules"><b>Markdown Formatting Rules</b></a></li> |
| 199 | <li><a href="backoffice.md">mechanism of Fossil — The Backoffice</a></li> |
| 200 |