# HG changeset patch # User Luke Schierer # Date 1064926498 0 # Node ID b794695d7c72f19e560eff88d926c292106482ef # Parent 184ec972f0f5c4de42f2ab0a6a4a51514b3cdf75 [gaim-migrate @ 7635] Arun A Tharuvai (aat) writes: " The function zephyr_to_html() occasionally interprets some actual text as non-functional formatting code to be ignored. All text between an @ sign (used to start tags), and the first opener (one of '<', '{', '[', or '(' ) for example, From: , was getting munged to From: The attached patch checks for the existence of a closer between an @ and an opener, outputting the section verbatim." committer: Tailor Script diff -r 184ec972f0f5 -r b794695d7c72 ChangeLog --- a/ChangeLog Tue Sep 30 12:49:20 2003 +0000 +++ b/ChangeLog Tue Sep 30 12:54:58 2003 +0000 @@ -8,6 +8,7 @@ * Multiple copies of gaim installed at different locations no longer attempt to load the same, possibly incompatible plugins (Robert McQueen) + * Zepher formatting fixes (Arun A Tharuvai) * Chinese (Traditional) translation updated (Ambrose C. Li) version 0.70 (09/28/2003): diff -r 184ec972f0f5 -r b794695d7c72 src/protocols/zephyr/zephyr.c --- a/src/protocols/zephyr/zephyr.c Tue Sep 30 12:49:20 2003 +0000 +++ b/src/protocols/zephyr/zephyr.c Tue Sep 30 12:54:58 2003 +0000 @@ -195,7 +195,7 @@ char *buf; int end; for (end=1; (cnt+end) <= len && - !IS_OPENER(message[cnt+end]); end++); + !IS_OPENER(message[cnt+end]) && !IS_CLOSER(message[cnt+end]); end++); buf = g_new0(char, end); if (end) { g_snprintf(buf, end, "%s", message+cnt+1); @@ -243,7 +243,17 @@ if ((cnt+end) > len) { g_string_append_c(frames->text, '@'); cnt++; - } else { + } else if (IS_CLOSER(message[cnt+end])) { + /* We have @chars..closer . This is + merely a sequence of chars that isn't a formatting tag + */ + int tmp=cnt; + while (tmp<=cnt+end) { + g_string_append_c(frames->text,message[tmp]); + tmp++; + } + cnt+=end+1; + } else { /* unrecognized thingie. act like it's not there, but we * still need to take care of the corresponding closer, * make a frame that does nothing. */