aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-html-utils.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-08-05 21:39:16 +0800
committerDan Winship <danw@src.gnome.org>2002-08-05 21:39:16 +0800
commitfb410a4f98a01358049b82d1593b97969069cc0c (patch)
treed2c4108f941fab356a83b0fb0469ce80e4c12fc3 /e-util/e-html-utils.c
parentbecfb9e15d99117c99280248fc42959fc9d13242 (diff)
downloadgsoc2013-evolution-fb410a4f98a01358049b82d1593b97969069cc0c.tar.gz
gsoc2013-evolution-fb410a4f98a01358049b82d1593b97969069cc0c.tar.zst
gsoc2013-evolution-fb410a4f98a01358049b82d1593b97969069cc0c.zip
Remove the logic that assumes "Rupert> " is a citation, since it misfires
* e-html-utils.c (is_citation): Remove the logic that assumes "Rupert> " is a citation, since it misfires more often than it hits. svn path=/trunk/; revision=17696
Diffstat (limited to 'e-util/e-html-utils.c')
-rw-r--r--e-util/e-html-utils.c44
1 files changed, 16 insertions, 28 deletions
diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c
index 958987c475..bc05d26f25 100644
--- a/e-util/e-html-utils.c
+++ b/e-util/e-html-utils.c
@@ -118,41 +118,29 @@ email_address_extract (const unsigned char **cur, char **out, const unsigned cha
static gboolean
is_citation (const unsigned char *c, gboolean saw_citation)
{
- gunichar u;
- gint i;
+ const unsigned char *p;
+
+ if (*c != '>')
+ return FALSE;
/* A line that starts with a ">" is a citation, unless it's
* just mbox From-mangling...
*/
- if (*c == '>') {
- const unsigned char *p;
-
- if (strncmp (c, ">From ", 6) != 0)
- return TRUE;
-
- /* If the previous line was a citation, then say this
- * one is too.
- */
- if (saw_citation)
- return TRUE;
+ if (strncmp (c, ">From ", 6) != 0)
+ return TRUE;
- /* Same if the next line is */
- p = (const unsigned char *)strchr ((const char *)c, '\n');
- if (p && *++p == '>')
- return TRUE;
+ /* If the previous line was a citation, then say this
+ * one is too.
+ */
+ if (saw_citation)
+ return TRUE;
- /* Otherwise, it was just an isolated ">From" line. */
- return FALSE;
- }
+ /* Same if the next line is */
+ p = (const unsigned char *)strchr ((const char *)c, '\n');
+ if (p && *++p == '>')
+ return TRUE;
- /* Check for "Rupert> " and the like... */
- for (i = 0; c && *c && g_unichar_validate (g_utf8_get_char (c)) && *c != '\n' && i < 10; i ++, c = g_utf8_next_char (c)) {
- u = g_utf8_get_char (c);
- if (u == '>')
- return TRUE;
- if (!g_unichar_isalnum (u))
- return FALSE;
- }
+ /* Otherwise, it was just an isolated ">From" line. */
return FALSE;
}