removed a bunch of blank comment lines
[citadel.git] / webcit / html2html.c
index 5f0ae0f16794e7537bb87f6072e337359907271c..965dc55d69bc57ea9458068f8d19602897b261aa 100644 (file)
@@ -2,20 +2,15 @@
  * Output an HTML message, modifying it slightly to make sure it plays nice
  * with the rest of our web framework.
  *
- * Copyright (c) 2005-2011 by the citadel.org team
+ * Copyright (c) 2005-2012 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
+ * it under the terms of the GNU General Public License, version 3.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
  */
 
 #include "webcit.h"
@@ -386,7 +381,6 @@ void output_html(const char *supplied_charset, int treat_as_wiki, int msgnum, St
                else if (!strncasecmp(ptr, "<a href=\"", 9)) {
                        ++alevel;
                        ++brak;
-                       syslog(LOG_DEBUG, "\033[32mHYPERLINK: %s\033[0m", ptr);
                        if ( ((strchr(ptr, ':') < strchr(ptr, '/')))
                                        &&  ((strchr(ptr, '/') < strchr(ptr, '>'))) 
                           ) {
@@ -398,9 +392,12 @@ void output_html(const char *supplied_charset, int treat_as_wiki, int msgnum, St
                                (treat_as_wiki)
                                && (strncasecmp(ptr, "<a href=\"wiki?", 14))
                                && (strncasecmp(ptr, "<a href=\"dotgoto?", 17))
+                               && (strncasecmp(ptr, "<a href=\"knrooms?", 17))
                        ) {
                                content_length += 64;
-                               StrBufAppendPrintf(converted_msg, "<a href=\"wiki?page=");
+                               StrBufAppendPrintf(converted_msg, "<a href=\"wiki?go=");
+                               StrBufUrlescAppend(converted_msg, WC->CurRoom.name, NULL);
+                               StrBufAppendPrintf(converted_msg, "?page=");
                                ptr = &ptr[9];
                        }
                        else {