adium-1.4 3333:4aefc1875b59: The RTL check must look at the enco...
commits at adium.im
commits at adium.im
Thu Jan 27 06:08:35 UTC 2011
details: http://hg.adium.im/adium-1.4/rev/4aefc1875b59
revision: 3333:4aefc1875b59
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
(transplanted from e06b74c6f7fdd6169c1d076d6e0169469a29b70e)
diffs (14 lines):
diff -r ac58397ab59d -r 4aefc1875b59 Plugins/WebKit Message View/AIWebkitMessageViewStyle.m
--- a/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m Wed Jan 26 21:09:54 2011 -0600
+++ b/Plugins/WebKit Message View/AIWebkitMessageViewStyle.m Thu Jan 27 00:07:47 2011 -0600
@@ -815,8 +815,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