fix(bug): escape angularJS only if needed to keep legitimate directive

This commit is contained in:
Hivert Quentin
2026-08-12 10:53:51 +02:00
parent f0c23407bf
commit 41e2b7b1ab
2 changed files with 16 additions and 5 deletions
+10 -1
View File
@@ -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;