Skip to content

Commit

Permalink
Fixed data evaluation in ICS calendar event.
Browse files Browse the repository at this point in the history
  • Loading branch information
jepf committed Dec 6, 2024
1 parent 453cc21 commit ffbf2ee
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# 6.5.12 2024-??-??
-2024-12-06 Fixed data evaluation in ICS calendar event.
- 2024-11-28 Fixed Server Error, when Frontend::Template::GenerateBlockHooks###NAME has no valid data structure.
- 2024-11-01 Fixed Bug - Translate the ticket state in PDF search result (AgentTicketSearch|CustomerTicketSearch). Thanks to @BuilderNSV for reporting the issue. [#615](https://github.com/znuny/Znuny/issues/615)
- 2024-11-01 Sector Nord AG: Fixed uninitialized value in AdminSelectBox. Thanks to Sector Nord AG (@jsinagowitz). [PR#611](https://github.com/znuny/Znuny/pull/611)
Expand Down
24 changes: 15 additions & 9 deletions Kernel/System/CalendarEvents/ICS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,13 @@ sub _PrepareData {

my $Data = $Events{$EventID};

my $DTStart = $Data->{DTSTART};
my $DTEnd = $Data->{DTEND};
my $DTStartLocal = $Data->{DTSTART}->{local_c};
my $DTEndLocal = $Data->{DTEND}->{local_c};
my $DTStart = $Data->{DTSTART};
my $DTEnd = $Data->{DTEND};

next EVENTID if ( ref $DTStart ne 'DateTime' ) || ( ref $DTEnd ne 'DateTime' );

my $DTStartLocal = $DTStart->{local_c};
my $DTEndLocal = $DTEnd->{local_c};

my %Date = (
Start => {
Expand Down Expand Up @@ -374,10 +377,13 @@ sub _PrepareData {
}
}

my $Organizer = $Data->{ORGANIZER}->{CN};
if ($Organizer) {
if (
IsHashRefWithData( $Data->{ORGANIZER} )
&& IsStringWithData( $Data->{ORGANIZER}->{CN} )
)
{
my %Safety = $HTMLUtilsObject->Safety(
String => $Organizer,
String => $Data->{ORGANIZER}->{CN},
NoApplet => 1,
NoObject => 1,
NoEmbed => 1,
Expand Down Expand Up @@ -420,13 +426,13 @@ sub _PrepareData {
}

for my $Property (qw(DESCRIPTION SUMMARY LOCATION)) {
if ( $Data->{$Property} ) {
if ( IsStringWithData( $Data->{$Property} ) ) {
$Data->{$Property} =~ s{\\n}{\n}g;
$Data->{$Property} =~ s{\\r}{\r}g;
$Data->{$Property} =~ s{&nbsp}{ }g;
}
my $PropertyString;
if ( $Data->{$Property} ) {
if ( IsStringWithData( $Data->{$Property} ) ) {
my %Safety = $HTMLUtilsObject->Safety(
String => $Data->{$Property},
NoApplet => 1,
Expand Down

0 comments on commit ffbf2ee

Please sign in to comment.