--- lib/TWiki/Plugins/CalendarPlugin.pm Sun Feb 29 14:01:00 2004 +++ ../../twiki/lib/TWiki/Plugins/CalendarPlugin.pm Sun Sep 19 11:02:08 2004 @@ -21,14 +21,16 @@ # ========================= package TWiki::Plugins::CalendarPlugin; +use HTML::TokeParser; # use strict; # ========================= use vars qw( $web $topic $user $installWeb $VERSION $libsLoaded $libsError $defaultsInitialized %defaults ); -$VERSION = '1.013'; #mrjc# Added support for multiple sources in topic= -$VERSION = '1.012'; #PTh# Added missing doc of gmtoffset parameter (was deleted in 1.011) +$VERSION = '1.013a'; #tko# added HTML support +#$VERSION = '1.013'; #mrjc# Added support for multiple sources in topic= +#$VERSION = '1.012'; #PTh# Added missing doc of gmtoffset parameter (was deleted in 1.011) #$VERSION = '1.011'; #PTh# fix deep recursion bug; preview shows unsaved events; performance improvements #$VERSION = '1.010'; #db# fix variable conflict in timezone code #$VERSION = '1.009'; #db# fix to allow event topics in other webs @@ -353,13 +355,21 @@ $text =~ s/%INCLUDE{(.*?)}%/&expandIncludedEvents( $1, $options{web}, $options{topic}, () )/geo; # keep only bullet lines - my @bullets = grep { /^\s+\*/ } split( /[\n\r]+/, $text ); + my $parser = HTML::TokeParser->new(\$text); #tko + my @bullets = (); + my $li; + while ($parser->get_tag("li")) { + $li = "* "; + $li .= $parser->get_text(); + push @bullets, $li; + } # bail out early if no events unless( @bullets ) { return $cal->as_HTML; }