diff --git a/UI/SOGoUI/UIxComponent.m b/UI/SOGoUI/UIxComponent.m index a8658e772..012d6edea 100644 --- a/UI/SOGoUI/UIxComponent.m +++ b/UI/SOGoUI/UIxComponent.m @@ -395,14 +395,18 @@ static SoProduct *commonProduct = nil; - (NSString *) relativePathToUserFolderSubPath: (NSString *) _sub { - NSString *dst, *rel, *theme; + NSString *dst, *rel, *theme, *safeTheme; dst = [[self userFolderPath] stringByAppendingPathComponent: _sub]; rel = [dst urlPathRelativeToPath:[self ownPath]]; theme = [[context request] formValueForKey: @"theme"]; if ([theme length]) - rel = [NSString stringWithFormat: @"%@?theme=%@", rel, theme]; + { + safeTheme = [theme stringWithoutHTMLInjection: YES]; + if([safeTheme isEqualToString: theme]) + rel = [NSString stringWithFormat: @"%@?theme=%@", rel, theme]; + } return rel; }