mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-27 10:54:59 +00:00
fix(mail): mind html encoded curly bracket
This commit is contained in:
@@ -1061,11 +1061,11 @@ static int cssEscapingCount;
|
||||
|
||||
|
||||
// Remove {{ and }} as they are interprated by angularJS with no way of escaping
|
||||
regex = [NSRegularExpression regularExpressionWithPattern:@"\\{\\{"
|
||||
regex = [NSRegularExpression regularExpressionWithPattern:@"(\\{\\{)|({{)"
|
||||
options: NSRegularExpressionCaseInsensitive error:&error];
|
||||
newResult = [regex stringByReplacingMatchesInString:result options:0 range:NSMakeRange(0, [result length]) withTemplate:@"{\\\\{"];
|
||||
result = [NSString stringWithString: newResult];
|
||||
regex = [NSRegularExpression regularExpressionWithPattern:@"\\}\\}"
|
||||
regex = [NSRegularExpression regularExpressionWithPattern:@"(\\}\\})|(}})"
|
||||
options: NSRegularExpressionCaseInsensitive error:&error];
|
||||
newResult = [regex stringByReplacingMatchesInString:result options:0 range:NSMakeRange(0, [result length]) withTemplate:@"}/}"];
|
||||
result = [NSString stringWithString: newResult];
|
||||
|
||||
Reference in New Issue
Block a user