Subject: | PATCH: semicolons must not be escaped in the rrule property |
This patch addresses semicolons appear in the recur type (ex. rrule
property). Semicolons must not be escaped in the rrule property
according to the iCalendar specifications.
I can share my calendars with my colleagues by using this module.
Thanks!
Takeru
Subject: | Property.pm.patch |
--- Property.pm.orig 2006-01-24 23:36:29.000000000 +0900
+++ Property.pm 2006-09-07 02:43:07.000000000 +0900
@@ -77,7 +77,7 @@
my $self = shift;
my $string = uc( $self->key )
. $self->_parameters_as_string . ":"
- . $self->_value_as_string . "\n";
+ . $self->_value_as_string($self->key) . "\n";
# Assumption: the only place in an iCalendar that needs folding are property
# lines
@@ -89,6 +89,7 @@
=head2 _value_as_string
Returns the property's value as a string.
+Semicolons are not escaped when the value is recur type (the key is rrule).
Values are quoted according the ICal spec:
L<http://www.kanzaki.com/docs/ical/text.html>.
@@ -99,10 +100,11 @@
sub _value_as_string {
my $self = shift;
+ my $key = shift;
my $value = $self->value();
$value =~ s/\\/\\/gs;
- $value =~ s/\Q;/\\;/gs;
+ $value =~ s/\Q;/\\;/gs unless lc($key) eq 'rrule';
$value =~ s/,/\\,/gs;
$value =~ s/\n/\\n/gs;
$value =~ s/\\N/\\N/gs;