+2007-02-27 [colin] 2.8.0cvs6
+
+ * src/mainwindow.c
+ * src/common/utils.c
+ * src/common/utils.h
+ Fix '+' in mailto URIs for List-* headers
+
2007-02-27 [colin] 2.8.0cvs5
* src/gtk/gtkutils.c
( cvs diff -u -r 1.59.2.53 -r 1.59.2.54 src/prefs_filtering.c; cvs diff -u -r 1.1.4.33 -r 1.1.4.34 src/prefs_filtering_action.c; cvs diff -u -r 1.43.2.55 -r 1.43.2.56 src/prefs_matcher.c; ) > 2.8.0cvs3.patchset
( cvs diff -u -r 1.149.2.65 -r 1.149.2.66 src/inc.c; ) > 2.8.0cvs4.patchset
( cvs diff -u -r 1.5.2.53 -r 1.5.2.54 src/gtk/gtkutils.c; ) > 2.8.0cvs5.patchset
+( cvs diff -u -r 1.274.2.173 -r 1.274.2.174 src/mainwindow.c; cvs diff -u -r 1.36.2.98 -r 1.36.2.99 src/common/utils.c; cvs diff -u -r 1.20.2.44 -r 1.20.2.45 src/common/utils.h; ) > 2.8.0cvs6.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=5
+EXTRA_VERSION=6
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
/* Decodes URL-Encoded strings (i.e. strings in which spaces are replaced by
* plusses, and escape characters are used)
*/
-void decode_uri(gchar *decoded_uri, const gchar *encoded_uri)
+void decode_uri_with_plus(gchar *decoded_uri, const gchar *encoded_uri, gboolean with_plus)
{
gchar *dec = decoded_uri;
const gchar *enc = encoded_uri;
enc += 2;
}
} else {
- if (*enc == '+')
+ if (with_plus && *enc == '+')
*dec = ' ';
else
*dec = *enc;
*dec = '\0';
}
+void decode_uri(gchar *decoded_uri, const gchar *encoded_uri)
+{
+ decode_uri_with_plus(decoded_uri, encoded_uri, TRUE);
+}
+
gint scan_mailto_url(const gchar *mailto, gchar **to, gchar **cc, gchar **bcc,
gchar **subject, gchar **body, gchar **attach)
{
gint get_uri_len (const gchar *str);
void decode_uri (gchar *decoded_uri,
const gchar *encoded_uri);
+void decode_uri_with_plus (gchar *decoded_uri,
+ const gchar *encoded_uri,
+ gboolean with_plus);
gint scan_mailto_url (const gchar *mailto,
gchar **to,
gchar **cc,
const gchar *buf;
gint i = 0;
buf = *buffer;
-
+ gboolean with_plus = TRUE;
+
if (buf == 0x00) {
*url_decoded = '\0';
*buffer = NULL;
/* First non space and non comment must be a < */
if (*buf =='<' ) {
buf++;
+ if (!strncmp(buf, "mailto:", strlen("mailto:")))
+ with_plus = FALSE;
for (i = 0; *buf != '>' && *buf != 0x00 && i<maxlen; tmp[i++] = *(buf++));
buf++;
}
if (i == maxlen) {
return;
}
- decode_uri (url_decoded, (const gchar *)tmp);
+ decode_uri_with_plus (url_decoded, (const gchar *)tmp, with_plus);
/* Prepare the work for the next url in the list */
/* after the closing bracket >, ignore space, comments and tabs */