Fossil SCM

Fix problem reported by Carlo Miron on fossil-dev mailing list: [38a47074] broke empty markdown links

jan.nijtmans 2016-06-21 15:20 trunk
Commit 6bbec5fb211b88d67fa3751b612f7fac4d35a473
1 file changed +1 -1
--- src/markdown_html.c
+++ src/markdown_html.c
@@ -357,11 +357,11 @@
357357
struct Blob *content,
358358
void *opaque
359359
){
360360
char *zLink = blob_buffer(link);
361361
BLOB_APPEND_LITERAL(ob, "<a href=\"");
362
- if( zLink[0]=='/' ){
362
+ if( zLink && zLink[0]=='/' ){
363363
/* For any hyperlink that begins with "/", make it refer to the root
364364
** of the Fossil repository */
365365
blob_append(ob, g.zTop, -1);
366366
}
367367
html_escape(ob, blob_buffer(link), blob_size(link));
368368
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button