summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-30 06:55:33 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2006-07-30 06:55:33 +0000
commitb220a1100869bc930ed886062d95c464a0bc3689 (patch)
tree81e0133657ad9eadd49bb4c577b8bbc6ca05efc5
parentb0885a7278186f3397cc08d77b1b5399880c9ead (diff)
stop abusing titlepage for internal encoding (esp since it doesn't work)
-rw-r--r--IkiWiki/Plugin/aggregate.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm
index a07d45dec..41ca9cce0 100644
--- a/IkiWiki/Plugin/aggregate.pm
+++ b/IkiWiki/Plugin/aggregate.pm
@@ -107,6 +107,8 @@ sub delete (@) { #{{{
} #}}}
sub loadstate () { #{{{
+ eval q{use HTML::Entities};
+ die $@ if $@;
if (-e "$IkiWiki::config{wikistatedir}/aggregate") {
open (IN, "$IkiWiki::config{wikistatedir}/aggregate" ||
die "$IkiWiki::config{wikistatedir}/aggregate: $!");
@@ -118,7 +120,7 @@ sub loadstate () { #{{{
my ($field, $val)=split(/=/, $i, 2);
if ($field eq "name" || $field eq "feed" ||
$field eq "guid" || $field eq "message") {
- $data->{$field}=IkiWiki::pagetitle($val);
+ $data->{$field}=decode_entities($val, " \t\n");
}
elsif ($field eq "tag") {
push @{$data->{tags}}, $val;
@@ -141,6 +143,8 @@ sub loadstate () { #{{{
} #}}}
sub savestate () { #{{{
+ eval q{use HTML::Entities};
+ die $@ if $@;
open (OUT, ">$IkiWiki::config{wikistatedir}/aggregate" ||
die "$IkiWiki::config{wikistatedir}/aggregate: $!");
foreach my $data (values %feeds, values %guids) {
@@ -162,7 +166,7 @@ sub savestate () { #{{{
foreach my $field (keys %$data) {
if ($field eq "name" || $field eq "feed" ||
$field eq "guid" || $field eq "message") {
- push @line, "$field=".IkiWiki::titlepage($data->{$field});
+ push @line, "$field=".encode_entities($data->{$field}, " \t\n");
}
elsif ($field eq "tags") {
push @line, "tag=$_" foreach @{$data->{tags}};