Markdown Wiki: add our prefix to relative URLs
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 8 Dec 2013 12:58:04 +0000 (13:58 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 8 Dec 2013 12:58:04 +0000 (13:58 +0100)
webcit/msg_renderers.c

index 2132a2dd42f2271c196cf0d5c6e9e38e846eb4af..922ff6201728fabef530c1b07a8bcaf4e2db7276 100644 (file)
@@ -1138,6 +1138,12 @@ void render_MAIL_html(StrBuf *Target, WCTemplputParams *TP, StrBuf *FoundCharset
 }
 
 #ifdef HAVE_MARKDOWN
+/*
+char * MarkdownHandleURL(const char* SourceURL, const int len, void* something)
+{
+
+}
+*/
 void render_MAIL_markdown(StrBuf *Target, WCTemplputParams *TP, StrBuf *FoundCharset)
 {
 #include <mkdio.h>
@@ -1149,6 +1155,7 @@ void render_MAIL_markdown(StrBuf *Target, WCTemplputParams *TP, StrBuf *FoundCha
                return;
 
        doc = mkd_string(ChrPtr(Mime->Data), StrLength(Mime->Data), 0);
+       mkd_basename(doc, "/wiki?page=");
        mkd_compile(doc, 0);
        if (mkd_document(doc, &md_as_html) != EOF) {
                FreeStrBuf(&Mime->Data);