mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-12 10:23:19 +00:00
fix(bug): escape angularJS only if needed to keep legitimate directive
This commit is contained in:
@@ -374,6 +374,7 @@
|
||||
- (iCalEvent *) authorativeEvent
|
||||
{
|
||||
iCalEvent *authorativeEvent;
|
||||
NSString *comment, *cleanComment;
|
||||
|
||||
[self storedEvent];
|
||||
if (!storedEvent
|
||||
@@ -382,6 +383,14 @@
|
||||
else
|
||||
authorativeEvent = [self storedEvent];
|
||||
|
||||
//Clean authorative event
|
||||
if ((comment = [authorativeEvent comment])) {
|
||||
cleanComment = [comment stringWithoutHTMLInjection: NO stripAngular:YES];
|
||||
[authorativeEvent setComment: cleanComment];
|
||||
}
|
||||
|
||||
|
||||
|
||||
return authorativeEvent;
|
||||
}
|
||||
|
||||
@@ -587,7 +596,7 @@
|
||||
|
||||
//Sanitise the html content
|
||||
if([d objectForKey:@"content"]){
|
||||
[d setObject: [[d objectForKey:@"content"] stringWithoutHTMLInjection: NO stripAngular:YES] forKey: @"content"];
|
||||
[d setObject: [[d objectForKey:@"content"] stringWithoutHTMLInjection: NO stripAngular:NO] forKey: @"content"];
|
||||
}
|
||||
|
||||
return d;
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
|
||||
|
||||
|
||||
content = [[[self generateResponse] contentAsString] stringWithoutHTMLInjection: NO stripAngular:YES];
|
||||
content = [[[self generateResponse] contentAsString] stringWithoutHTMLInjection: NO stripAngular:NO];
|
||||
if ([self respondsToSelector:@selector(getException)]) {
|
||||
e = [self getException];
|
||||
}
|
||||
@@ -327,10 +327,12 @@
|
||||
|
||||
- (NSString *) filenameForDisplay
|
||||
{
|
||||
NSString *s;
|
||||
NSString *s, *cleanFilename;
|
||||
|
||||
if ((s = [self filename]) != nil)
|
||||
return s;
|
||||
if ((s = [self filename]) != nil) {
|
||||
cleanFilename = [s stringWithoutHTMLInjection: NO stripAngular:YES];
|
||||
return cleanFilename;
|
||||
}
|
||||
|
||||
s = [partPath componentsJoinedByString:@"-"];
|
||||
return ([s length] > 0)
|
||||
|
||||
Reference in New Issue
Block a user