html2html.c: when converting links, don't add quotes to URL's
authorArt Cancro <ajc@citadel.org>
Thu, 9 Feb 2006 04:40:34 +0000 (04:40 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 9 Feb 2006 04:40:34 +0000 (04:40 +0000)
that were incorrectly specified without quotes.  That just breaks them.

webcit/html2html.c

index b1eb4b0bb5d8967e673cfc43c43af99b54100625..ca8804c1aa6d707699863bbf91785d12c9ad984e 100644 (file)
@@ -274,7 +274,7 @@ void output_html(char *supplied_charset, int treat_as_wiki) {
                        ++alevel;
                }
                /** Make external links open in a separate window */
-               else if (!strncasecmp(ptr, "<a href=", 8)) {
+               else if (!strncasecmp(ptr, "<a href=\"", 9)) {
                        ++alevel;
                        if ( ((strchr(ptr, ':') < strchr(ptr, '/')))
                             &&  ((strchr(ptr, '/') < strchr(ptr, '>'))) 
@@ -294,9 +294,9 @@ void output_html(char *supplied_charset, int treat_as_wiki) {
                                ptr = &ptr[9];
                        }
                        else {
-                               sprintf(&converted_msg[output_length], "<a href=");
-                               output_length += 8;
-                               ptr = &ptr[8];
+                               sprintf(&converted_msg[output_length], "<a href=\"");
+                               output_length += 9;
+                               ptr = &ptr[9];
                        }
                }
                /**