Fossil SCM
Fix problem reported by Carlo Miron on fossil-dev mailing list: [38a47074] broke empty markdown links
Commit
6bbec5fb211b88d67fa3751b612f7fac4d35a473
Parent
cb6b6c977b00e23…
1 file changed
+1
-1
+1
-1
| --- src/markdown_html.c | ||
| +++ src/markdown_html.c | ||
| @@ -357,11 +357,11 @@ | ||
| 357 | 357 | struct Blob *content, |
| 358 | 358 | void *opaque |
| 359 | 359 | ){ |
| 360 | 360 | char *zLink = blob_buffer(link); |
| 361 | 361 | BLOB_APPEND_LITERAL(ob, "<a href=\""); |
| 362 | - if( zLink[0]=='/' ){ | |
| 362 | + if( zLink && zLink[0]=='/' ){ | |
| 363 | 363 | /* For any hyperlink that begins with "/", make it refer to the root |
| 364 | 364 | ** of the Fossil repository */ |
| 365 | 365 | blob_append(ob, g.zTop, -1); |
| 366 | 366 | } |
| 367 | 367 | html_escape(ob, blob_buffer(link), blob_size(link)); |
| 368 | 368 |
| --- src/markdown_html.c | |
| +++ src/markdown_html.c | |
| @@ -357,11 +357,11 @@ | |
| 357 | struct Blob *content, |
| 358 | void *opaque |
| 359 | ){ |
| 360 | char *zLink = blob_buffer(link); |
| 361 | BLOB_APPEND_LITERAL(ob, "<a href=\""); |
| 362 | if( zLink[0]=='/' ){ |
| 363 | /* For any hyperlink that begins with "/", make it refer to the root |
| 364 | ** of the Fossil repository */ |
| 365 | blob_append(ob, g.zTop, -1); |
| 366 | } |
| 367 | html_escape(ob, blob_buffer(link), blob_size(link)); |
| 368 |
| --- src/markdown_html.c | |
| +++ src/markdown_html.c | |
| @@ -357,11 +357,11 @@ | |
| 357 | struct Blob *content, |
| 358 | void *opaque |
| 359 | ){ |
| 360 | char *zLink = blob_buffer(link); |
| 361 | BLOB_APPEND_LITERAL(ob, "<a href=\""); |
| 362 | if( zLink && zLink[0]=='/' ){ |
| 363 | /* For any hyperlink that begins with "/", make it refer to the root |
| 364 | ** of the Fossil repository */ |
| 365 | blob_append(ob, g.zTop, -1); |
| 366 | } |
| 367 | html_escape(ob, blob_buffer(link), blob_size(link)); |
| 368 |