adium-1.4 2912:f1a416077965: Fix of long-standing bug in FONT-ta...

commits at adium.im commits at adium.im
Mon Apr 5 19:53:50 UTC 2010


details:	http://hg.adium.im/adium-1.4/rev/f1a416077965
revision:	2912:f1a416077965
author:		Andreas Monitzer <am at adiumx.com>
date:		Thu Apr 01 22:27:02 2010 +0200

Fix of long-standing bug in FONT-tag handling by kbotc. Fixes #9594
Subject: adium-1.4 2913:a5688ca3fdf9: Another font flag fix by kbotc. Refs #9594

details:	http://hg.adium.im/adium-1.4/rev/a5688ca3fdf9
revision:	2913:a5688ca3fdf9
author:		Andreas Monitzer <am at adiumx.com>
date:		Thu Apr 01 22:41:37 2010 +0200

Another font flag fix by kbotc. Refs #9594

diffs (39 lines):

diff -r f211430a455e -r a5688ca3fdf9 Frameworks/Adium Framework/Source/AIHTMLDecoder.m
--- a/Frameworks/Adium Framework/Source/AIHTMLDecoder.m	Tue Mar 16 22:14:34 2010 -0400
+++ b/Frameworks/Adium Framework/Source/AIHTMLDecoder.m	Thu Apr 01 22:41:37 2010 +0200
@@ -310,6 +310,7 @@
 			//Close any existing font tags, and open a new one
 			if (thingsToInclude.closingFontTags && openFontTag) {
 				[string appendString:@"</FONT>"];
+				openFontTag = NO;
 			}
 			if (!thingsToInclude.simpleTagsOnly) {
 				openFontTag = YES;
@@ -320,6 +321,7 @@
 			//Family
 			if (thingsToInclude.fontTags && familyName && (![familyName isEqualToString:currentFamily] || thingsToInclude.closingFontTags)) {
 				if (thingsToInclude.simpleTagsOnly) {
+					openFontTag = YES;
 					[string appendString:[NSString stringWithFormat:@"<FONT FACE=\"%@\">",familyName]];
 				} else {
 					//(traits | NSNonStandardCharacterSetFontMask) seems to be the proper test... but it is true for all fonts!
@@ -344,6 +346,7 @@
 			//Color
 			if (color) {
 				if (thingsToInclude.simpleTagsOnly) {
+					openFontTag = YES;
 					[string appendString:[NSString stringWithFormat:@"<FONT COLOR=\"#%@\">",color]];	
 				} else {
 					[string appendString:[NSString stringWithFormat:@" COLOR=\"#%@\"",color]];
@@ -673,9 +676,10 @@
 		oldLink = nil;
 	}
 
-	if (thingsToInclude.fontTags && thingsToInclude.closingFontTags && openFontTag) {
+	if (thingsToInclude.closingFontTags && openFontTag) {
 		//Close any open font tag
 		[string appendString:@"</FONT>"];
+		openFontTag = NO;
 	}
 	if (rightToLeft) {
 		//Close any open div




More information about the commits mailing list