diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-01-11 08:32:17 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2007-01-11 08:32:17 +0000 |
commit | 2b1b7b9a86db5473eafc8c89a6caeeb1e463b22c (patch) | |
tree | af78e4844b414d336d4ba52fb6113681b0e0cb59 | |
parent | 6f681de406d5489da42d89890a197eec86ffbf8b (diff) |
allow spaces around equals between name and value of MIME parameters.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1469 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ChangeLog.ja | 5 | ||||
-rw-r--r-- | libsylph/procmime.c | 8 |
3 files changed, 16 insertions, 2 deletions
@@ -1,5 +1,10 @@ 2007-01-11 + * libsylph/procmime.c: procmime_parse_mime_parameter(): allow spaces + around equals between name and value of MIME parameters. + +2007-01-11 + * libsylph/prefs_common.[ch] src/trayicon.c src/prefs_common_dialog.c: added the option to toggle window on diff --git a/ChangeLog.ja b/ChangeLog.ja index cae2d9bd..d2e3d3f2 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,5 +1,10 @@ 2007-01-11 + * libsylph/procmime.c: procmime_parse_mime_parameter(): MIME + パラメータの名前と値の間の等号の周囲の空白を許容するようにした。 + +2007-01-11 + * libsylph/prefs_common.[ch] src/trayicon.c src/prefs_common_dialog.c: トレイアイコンのクリックでウィンドウを diff --git a/libsylph/procmime.c b/libsylph/procmime.c index 775c30a8..243a0474 100644 --- a/libsylph/procmime.c +++ b/libsylph/procmime.c @@ -402,7 +402,7 @@ static gchar *procmime_find_parameter_delimiter(const gchar *param, while (*p) { if (*p == '=') break; - else if (*p == ';' || g_ascii_isspace(*p)) { + else if (*p == ';' || *p == '\r' || *p == '\n') { delim = p; break; } @@ -415,6 +415,8 @@ static gchar *procmime_find_parameter_delimiter(const gchar *param, *eq = p; ++p; + while (g_ascii_isspace(*p)) + ++p; if (*p == '"') { quoted = TRUE; ++p; @@ -424,7 +426,7 @@ static gchar *procmime_find_parameter_delimiter(const gchar *param, if (quoted == TRUE) { if (*p == '"') quoted = FALSE; - } else if (*p == ';' || g_ascii_isspace(*p)) { + } else if (*p == ';' || *p == '\r' || *p == '\n') { delim = p; break; } @@ -498,6 +500,7 @@ static MimeParams *procmime_parse_mime_parameter(const gchar *str) param = g_strdup(p); name = g_strndup(p, eq - p); + g_strchomp(name); if (*name != '*' && (ast = strchr(name, '*'))) { const gchar *next = ast + 1; @@ -526,6 +529,7 @@ static MimeParams *procmime_parse_mime_parameter(const gchar *str) } value = g_strdup(param + (eq - p) + 1); + g_strstrip(value); if (*value == '"') extract_quote(value, '"'); |