adium 3633:e06b74c6f7fd: The RTL check must look at the encoded ...

commits at adium.im commits at adium.im
Thu Jan 27 06:07:54 UTC 2011


details:	http://hg.adium.im/adium/rev/e06b74c6f7fd
revision:	3633:e06b74c6f7fd
author:		Evan Schoenberg
date:		Thu Jan 27 00:07:47 2011 -0600

The RTL check must look at the encoded message, not the template, to determine if the encoded message contains RTL text. Fixes #10403

diffs (14 lines):

diff -r c7323a40d94f -r e06b74c6f7fd Plugins/WebKit Message View/AIWebkitMessageViewStyle.m
--- a/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m	Wed Jan 26 21:02:18 2011 -0600
+++ b/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m	Thu Jan 27 00:07:47 2011 -0600
@@ -826,8 +826,8 @@
 				  withString:[NSColor representedColorForObject:contentSource.UID withValidColors:self.validSenderColors]];
 	
 	//HAX. The odd conditional here detects the rtl html that our html parser spits out.
-	BOOL isRTL = ([inString rangeOfString:@"<div dir=\"rtl\">"
-								  options:(NSCaseInsensitiveSearch | NSLiteralSearch)].location != NSNotFound);
+	BOOL isRTL = ([htmlEncodedMessage rangeOfString:@"<div dir=\"rtl\">"
+                                            options:(NSCaseInsensitiveSearch | NSLiteralSearch)].location != NSNotFound);
 	[inString replaceKeyword:@"%messageDirection%"
 				  withString:(isRTL ? @"rtl" : @"ltr")];
 	




More information about the commits mailing list