]> code.citadel.org Git - citadel.git/commitdiff
* fix citing from urls. use a new unescape function, that does one more unescape...
authorWilfried Göesgens <willi@citadel.org>
Tue, 7 Aug 2007 18:23:33 +0000 (18:23 +0000)
committerWilfried Göesgens <willi@citadel.org>
Tue, 7 Aug 2007 18:23:33 +0000 (18:23 +0000)
webcit/messages.c
webcit/webcit.c
webcit/webcit.h

index e40fc83304ec714c8dbcb76ed512cefc9c8337c6..53bee0fcfdf8eadf23f53abbaa474ed475f40da1 100644 (file)
@@ -1548,7 +1548,7 @@ void pullquote_message(long msgnum, int forward_attachments, int include_headers
                        }
                        wprintf("<tt>");
                        url(buf);
-                       msgescputs(buf);
+                       msgescputs1(buf);
                        wprintf("</tt><br />");
                }
                wprintf("</i><br />");
index 800dc40d178ddc4ccc5b27d5bfdcf435f401982a..d5e9510d644cd96fc0a003df244d2cfe635b24c2 100644 (file)
@@ -371,6 +371,27 @@ void msgesc(char *target, char *strbuf)
        }
 }
 
+/**
+ * \brief print a string to the client after cleaning it with msgesc() and stresc()
+ * \param strbuf string to be printed
+ */
+void msgescputs1( char *strbuf)
+{
+       char *outbuf;
+       char *outbuf2;
+       int buflen;
+
+       if (strbuf == NULL) return;
+       buflen = 3 * strlen(strbuf) + SIZ;
+       outbuf = malloc( buflen);
+       outbuf2 = malloc( buflen);
+       msgesc(outbuf, strbuf);
+       stresc(outbuf2, outbuf, 0, 0);
+       wprintf("%s", outbuf2);
+       free(outbuf);
+       free(outbuf2);
+}
+
 /**
  * \brief print a string to the client after cleaning it with msgesc()
  * \param strbuf string to be printed
index 43ecf6940b808b92afe7fbe24e9d77da242e14ee..d80d6ccc9a1c60f40d6cf0583e041cefcd0dcf11 100644 (file)
@@ -491,6 +491,7 @@ void url(char *buf);
 void escputs1(char *strbuf, int nbsp, int nolinebreaks);
 void msgesc(char *target, char *strbuf);
 void msgescputs(char *strbuf);
+void msgescputs1(char *strbuf);
 int extract_int(const char *source, int parmnum);
 long extract_long(const char *source, int parmnum);
 void stripout(char *str, char leftboundary, char rightboundary);