Apply Indic script fixes to SAE and master.

This commit is contained in:
Matthew Chen 2018-02-16 13:08:09 -05:00
parent 9341935700
commit 283fe17649
4 changed files with 24 additions and 2 deletions

View File

@ -138,7 +138,7 @@ typedef void (^SendMessageBlock)(SendCompletionBlock completion);
OWSAssert(data.length < kOversizeTextMessageSizeThreshold);
NSString *_Nullable messageText = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
DDLogVerbose(@"%@ messageTextForAttachment: %@", self.logTag, messageText);
return messageText;
return [messageText filterStringForDisplay];
}
- (void)threadWasSelected:(TSThread *)thread

View File

@ -37,6 +37,7 @@ NSString *const kLocalProfileUniqueId = @"kLocalProfileUniqueId";
@implementation OWSUserProfile
@synthesize avatarUrlPath = _avatarUrlPath;
@synthesize profileName = _profileName;
+ (NSString *)collection
{
@ -333,6 +334,22 @@ NSString *const kLocalProfileUniqueId = @"kLocalProfileUniqueId";
self.avatarFileName];
}
- (nullable NSString *)profileName
{
@synchronized(self)
{
return _profileName.filterStringForDisplay;
}
}
- (void)setProfileName:(nullable NSString *)profileName
{
@synchronized(self)
{
_profileName = profileName.filterStringForDisplay;
}
}
@end
NS_ASSUME_NONNULL_END

View File

@ -78,6 +78,11 @@ NS_ASSUME_NONNULL_BEGIN
return [data ows_isValidImage];
}
- (void)setSourceFilename:(nullable NSString *)sourceFilename
{
_sourceFilename = sourceFilename.filterStringForDisplay;
}
@end
#pragma mark -

View File

@ -638,7 +638,7 @@ public class ShareViewController: UIViewController, ShareViewDelegate, SAEFailed
fulfill((itemUrl: fileUrl, utiType: srcUtiType))
} else if let string = value as? String {
Logger.debug("\(strongSelf.logTag) string provider: \(string)")
guard let data = string.data(using: String.Encoding.utf8) else {
guard let data = string.filterStringForDisplay().data(using: String.Encoding.utf8) else {
let writeError = ShareViewControllerError.assertionError(description: "Error writing item data: \(String(describing: error))")
reject(writeError)
return