mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-28 09:53:23 +00:00
feat(core): Update to ckeditor 5. Fixes #5920. Add SOGoForceRawHtmlSignature to disable raw-html-embed. Removed CKEditor signature box style when composing mail. Fix issue where raw-html-embed was added when changind signature
This commit is contained in:
@@ -102,6 +102,8 @@
|
||||
|
||||
- (NSString *) passwordRecoveryFrom;
|
||||
|
||||
- (BOOL) forceRawHtmlSignature;
|
||||
|
||||
@end
|
||||
|
||||
#endif /* SOGODOMAINDEFAULTS_H */
|
||||
|
||||
@@ -465,4 +465,9 @@
|
||||
return emailFrom;
|
||||
}
|
||||
|
||||
- (BOOL) forceRawHtmlSignature
|
||||
{
|
||||
return [self objectForKey: @"SOGoForceRawHtmlSignature"] ? [self boolForKey: @"SOGoForceRawHtmlSignature"] : YES;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
- (unsigned int) weekNumberForDate: (NSCalendarDate *) date;
|
||||
|
||||
- (NSArray *) mailAccounts;
|
||||
- (NSArray *) mailAccountsNoRawHtmlSignature;
|
||||
- (NSArray *) mailAccountsWithDelegatedIdentities: (BOOL) appendDeletegatedIdentities;
|
||||
- (NSDictionary *) accountWithName: (NSString *) accountName;
|
||||
- (NSArray *) allIdentities;
|
||||
|
||||
@@ -1026,10 +1026,15 @@ static const NSString *kEncryptedUserNamePrefix = @"uenc";
|
||||
|
||||
- (NSArray *) mailAccounts
|
||||
{
|
||||
return [self mailAccountsWithDelegatedIdentities: YES];
|
||||
return [self mailAccountsWithDelegatedIdentities: YES forceRawHtmlSignature: [[self domainDefaults] forceRawHtmlSignature]];
|
||||
}
|
||||
|
||||
- (NSArray *) mailAccountsWithDelegatedIdentities: (BOOL) appendDeletegatedIdentities
|
||||
- (NSArray *) mailAccountsNoRawHtmlSignature
|
||||
{
|
||||
return [self mailAccountsWithDelegatedIdentities: YES forceRawHtmlSignature: NO];
|
||||
}
|
||||
|
||||
- (NSArray *) mailAccountsWithDelegatedIdentities: (BOOL) appendDeletegatedIdentities forceRawHtmlSignature: (BOOL) forceRawHtmlSignature
|
||||
{
|
||||
NSArray *auxAccounts;
|
||||
|
||||
@@ -1112,8 +1117,9 @@ static const NSString *kEncryptedUserNamePrefix = @"uenc";
|
||||
if ([tmpIdentity objectForKey: @"signature"] ) {
|
||||
// Add raw html embed class
|
||||
if ([[tmpIdentity objectForKey: @"signature"] rangeOfString:@"raw-html-embed"].location == NSNotFound
|
||||
&& [[[self userDefaults] mailComposeMessageType] isEqualToString: @"html"]) {
|
||||
signature = [NSString stringWithFormat:@"<div class=\"raw-html-embed\">%@</div>", [tmpIdentity objectForKey: @"signature"]];
|
||||
&& [[[self userDefaults] mailComposeMessageType] isEqualToString: @"html"]
|
||||
&& forceRawHtmlSignature) {
|
||||
signature = [NSString stringWithFormat:@"<div class=\"raw-html-embed sogo-raw-html-embed\">%@</div>", [tmpIdentity objectForKey: @"signature"]];
|
||||
[tmpIdentity setObject:signature forKey:@"signature"];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user