diff options
author | jocuri%softhome.net <> | 2004-03-17 06:18:40 +0100 |
---|---|---|
committer | jocuri%softhome.net <> | 2004-03-17 06:18:40 +0100 |
commit | 17559921835f036a50330476176ea29c598ba84c (patch) | |
tree | 30a62af6791bd961aa5c6be328b9f07fd10a1ce4 /Bugzilla/Template.pm | |
parent | 2e96788b00b440821b98d37d582392a51d79f1a3 (diff) | |
download | bugzilla-17559921835f036a50330476176ea29c598ba84c.tar.gz bugzilla-17559921835f036a50330476176ea29c598ba84c.tar.xz |
Patch for bug 235459: add icalendar output format in buglist; patch by William Jon McCann <mccannwj@pha.jhu.edu>; r=vlad; a=justdave.
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r-- | Bugzilla/Template.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index c123154bb..310a18161 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -293,6 +293,31 @@ sub create { return $var; }, + # iCalendar contentline filter + ics => [ sub { + my ($context, @args) = @_; + return sub { + my ($var) = shift; + my ($par) = shift @args; + my ($output) = ""; + + $var =~ s/[\r\n]/ /g; + $var =~ s/([;\\\"])/\\$1/g; + + if ($par) { + $output = sprintf("%s:%s", $par, $var); + } else { + $output = $var; + } + + $output =~ s/(.{75,75})/$1\n /g; + + return $output; + }; + }, + 1 + ], + # We force filtering of every variable in key security-critical # places; we have a none filter for people to use when they # really, really don't want a variable to be changed. |