From f49fd54ae0059a44bd32f68c20150b467e569afc Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 24 Jan 2006 18:56:57 +0000 Subject: [PATCH] * Fixes to wiki view to handle "short" links. --- webcit/ChangeLog | 3 +++ webcit/html2html.c | 32 +++++++++++++++++++++++++------- webcit/messages.c | 2 +- webcit/rss.c | 2 +- webcit/webcit.h | 3 ++- 5 files changed, 32 insertions(+), 10 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index da81745bd..cfe173af9 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,5 +1,8 @@ $Id$ +Tue Jan 24 13:56:03 EST 2006 ajc +* Fixes to wiki view to handle "short" links. + Tue Jan 24 11:07:04 EST 2006 ajc * client_getln() now fails if the client attempts to transmit non printable characters. This is for fast bailout if someone tries to do HTTPS to a diff --git a/webcit/html2html.c b/webcit/html2html.c index 794f69165..6992c4062 100644 --- a/webcit/html2html.c +++ b/webcit/html2html.c @@ -17,7 +17,7 @@ * Also convert weird character sets to UTF-8 if necessary. * \param charset the input charset */ -void output_html(char *charset) { +void output_html(char *charset, int treat_as_wiki) { char buf[SIZ]; char *msg; char *ptr; @@ -151,14 +151,32 @@ void output_html(char *charset) { ptr = &ptr[16]; ++alevel; } - /** Make links open in a separate window */ + /** Make external links open in a separate window */ else if (!strncasecmp(ptr, "wc_view == VIEW_WIKI ? 1 : 0)); } /** Unknown weirdness */ diff --git a/webcit/rss.c b/webcit/rss.c index ba1116432..48a7ad9a4 100644 --- a/webcit/rss.c +++ b/webcit/rss.c @@ -328,7 +328,7 @@ void display_rss(char *roomname, char *request_method) /** HTML is fun, but we've got to strip it first */ else if (!strcasecmp(content_type, "text/html")) { wprintf(" \n"); } diff --git a/webcit/webcit.h b/webcit/webcit.h index 93ec4e3d2..22ec3a3cf 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -477,6 +477,7 @@ void embed_main_menu(void); void serv_read(char *buf, int bytes); int haschar(char *, char); void readloop(char *oper); +void read_message(long msgnum, int printable_view, char *section); void embed_message(char *msgnum_as_string); void print_message(char *msgnum_as_string); void display_headers(char *msgnum_as_string); @@ -586,7 +587,7 @@ void display_addressbook(long msgnum, char alpha); void offer_start_page(void); void convenience_page(char *titlebarcolor, char *titlebarmsg, char *messagetext); void change_start_page(void); -void output_html(char *); +void output_html(char *, int); void display_floorconfig(char *); void delete_floor(void); void create_floor(void); -- 2.30.2