* mu: (re)add special handling for '$' (fixes #193)

This commit is contained in:
djcb 2013-04-28 21:54:25 +03:00
parent 85fb0e14ef
commit 7d48ed53a7
4 changed files with 7 additions and 2 deletions

View File

@ -467,6 +467,7 @@ is_xapian_special_char (char c)
case ':':
case '(':
case ')':
case '$':
case '"':
case '\\':
case '\'':
@ -534,6 +535,7 @@ mu_str_xapian_escape_in_place_try (char *term, gboolean esc_space, GStringChunk
case '[':
case ']':
case '+':
case '$':
case '\\':
case '-':
*cur = ESC_CHAR;

View File

@ -200,7 +200,7 @@ test_mu_str_xapian_escape (void)
{ "Foo. Bar", "foo bar" },
{ "subject:test@foo", "subject:test_foo" },
{ "xxx:test@bar", "xxx test_bar" },
{ "aa$bb$cc", "aa bb cc" },
{ "aa$bb$cc", "aa_bb_cc" },
{ "date:2010..2012", "date:2010..2012"},
{ "d:2010..2012", "d:2010..2012"},
{ "size:10..20", "size:10..20"},

View File

@ -7,6 +7,7 @@ Organization: The Fellowship of the Ring
MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Message-Id: <abcd$efgh@example.com>
Let's write some fünkÿ text

View File

@ -176,7 +176,9 @@ test_mu_query_01 (void)
{ "foo:pepernoot", 0 },
{ "funky", 1 },
{ "fünkÿ", 1 },
{ "", 18 }
{ "", 18 },
{ "msgid:abcd$efgh@example.com", 1},
{ "i:abcd$efgh@example.com", 1},
};
for (i = 0; i != G_N_ELEMENTS(queries); ++i)