summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-05-28 19:43:28 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-05-28 19:43:28 +0000
commitba1765fbdfeb0fd1fdf1354c1688580ef7864b68 (patch)
treeca178c0c9343617e4b85879fb8ca91bd6a77605a /IkiWiki/Plugin
parent8fc13829491c4a3ec3d8e174fd96687e111da251 (diff)
* More consistent encoding of titles in rss and atom feeds. Don't use
ESCAPE=HTML for titles in the templates for these feeds, and instead escape the title going in to the template. Previously, the title was sometimes double-escaped in a feed (if set via meta title), and sometimes not (if set from the page filename). * In the meta plugin, when a title is set, encode the html entities in it numerically. This works better in the current landscape of a rss spec that doesn't specify encoding, and variously broken feed consumers, according to <http://www.rssboard.org/rss-profile#data-types-characterdata>.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/inline.pm4
-rw-r--r--IkiWiki/Plugin/meta.pm2
2 files changed, 3 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 063673730..e23f7b903 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -333,7 +333,7 @@ sub genfeed ($$$$@) { #{{{
my $pcontent = absolute_urls(get_inline_content($p, $page), $url);
$itemtemplate->param(
- title => pagetitle(basename($p), 1),
+ title => pagetitle(basename($p)),
url => $u,
permalink => $u,
date_822 => date_822($pagectime{$p}),
@@ -377,7 +377,7 @@ sub genfeed ($$$$@) { #{{{
my $template=template($feedtype."page.tmpl", blind_cache => 1);
$template->param(
- title => $page ne "index" ? pagetitle($page, 1) : $config{wikiname},
+ title => $page ne "index" ? pagetitle($page) : $config{wikiname},
wikiname => $config{wikiname},
pageurl => $url,
content => $content,
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm
index 18e28a196..184146cfe 100644
--- a/IkiWiki/Plugin/meta.pm
+++ b/IkiWiki/Plugin/meta.pm
@@ -65,7 +65,7 @@ sub preprocess (@) { #{{{
}
}
elsif ($key eq 'title') {
- $title{$page}=encode_entities($value);
+ $title{$page}=HTML::Entities::encode_numeric($value);
}
elsif ($key eq 'permalink') {
$permalink{$page}=$value;