}
if (defined $params{subject}) {
- # encode title the same way meta does
+ # decode title the same way meta does
eval q{use HTML::Entities};
- $pagestate{$page}{meta}{title} = HTML::Entities::encode_numeric(decode_entities($params{subject}));
+ $pagestate{$page}{meta}{title} = decode_entities($params{subject});
}
if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+_/) {
if (exists $pagestate{$p}) {
if (exists $pagestate{$p}{meta}{guid}) {
- $itemtemplate->param(guid => $pagestate{$p}{meta}{guid});
+ eval q{use HTML::Entities};
+ $itemtemplate->param(guid => HTML::Entities::encode_numeric($pagestate{$p}{meta}{guid}));
}
if (exists $pagestate{$p}{meta}{updated}) {
# Metadata collection that needs to happen during the scan pass.
if ($key eq 'title') {
- my $encoded = HTML::Entities::encode_numeric($value);
- $pagestate{$page}{meta}{title} = $encoded;
-
+ $pagestate{$page}{meta}{title}=$value;
if (exists $params{sortas}) {
$pagestate{$page}{meta}{titlesort}=$params{sortas};
}
- elsif ($encoded ne $value) {
- $pagestate{$page}{meta}{titlesort}=$value;
- }
else {
delete $pagestate{$page}{meta}{titlesort};
}
return "";
}
elsif ($key eq 'description') {
- $pagestate{$page}{meta}{description}=HTML::Entities::encode_numeric($value);
+ $pagestate{$page}{meta}{description}=$value;
# fallthrough
}
elsif ($key eq 'guid') {
- $pagestate{$page}{meta}{guid}=HTML::Entities::encode_numeric($value);
+ $pagestate{$page}{meta}{guid}=$value;
# fallthrough
}
elsif ($key eq 'license') {
$template->param(meta => join("\n", grep { (! $seen{$_}) && ($seen{$_}=1) } @{$metaheaders{$page}}));
}
if (exists $pagestate{$page}{meta}{title} && $template->query(name => "title")) {
- $template->param(title => $pagestate{$page}{meta}{title});
+ $template->param(title => HTML::Entities::encode_numeric($pagestate{$page}{meta}{title}));
$template->param(title_overridden => 1);
}
- foreach my $field (qw{author authorurl description permalink}) {
+ foreach my $field (qw{author authorurl permalink}) {
$template->param($field => $pagestate{$page}{meta}{$field})
if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field);
}
+ foreach my $field (qw{description}) {
+ $template->param($field => HTML::Entities::encode_numeric($pagestate{$page}{meta}{$field}))
+ if exists $pagestate{$page}{meta}{$field} && $template->query(name => $field);
+ }
+
foreach my $field (qw{license copyright}) {
if (exists $pagestate{$page}{meta}{$field} && $template->query(name => $field) &&
($page eq $destpage || ! exists $pagestate{$destpage}{meta}{$field} ||
$field, 'po'));
}
}
+ delete $config{po_slave_languages}{$config{po_master_language}{code}};;
map {
islanguagecode($_)
if ($config{po_master_language}{code} ne 'en') {
# Add underlay containing translated source files
# for the master language.
-print STDERR "added underlay locale/$config{po_master_language}{code}/$underlay\n";
add_underlay("locale/$config{po_master_language}{code}/$underlay")
if -d "$config{underlaydirbase}/locale/$config{po_master_language}{code}/$underlay";
}
not regular wikilinks. If your wiki accidentially relied on the old,
buggy behavior, you might need to change pagespecs to use `link()`.
- To support the above change, all wikis need to be rebuilt on upgrade to
- this version. If you listed your wiki in /etc/ikiwiki/wikilist this will
- be done automatically when the Debian package is upgraded. Or use
- ikiwiki-mass-rebuild to force a rebuild.
+ Due to the above and other changes, all wikis need to be rebuilt on
+ upgrade to this version. If you listed your wiki in /etc/ikiwiki/wikilist
+ this will be done automatically when the Debian package is upgraded. Or
+ use ikiwiki-mass-rebuild to force a rebuild.
-- Simon McVittie <smcv@debian.org> Tue, 06 Apr 2010 20:53:07 +0100
-ikiwiki (3.20100406) UNRELEASED; urgency=low
+ikiwiki (3.20100410) UNRELEASED; urgency=low
[ Joey Hess ]
* bzr: Fix bzr log parsing to work with bzr 2.0. (liw)
This can be used to get names sorted by last name without displaying
them last name first.
* sortnaturally: New plugin; the title_natural sort method has moved here.
+ * meta: store fields consistently unescaped, and escape on use
+ A wiki rebuild is also needed due to this change.
[ Joey Hess ]
* Update dependency for git-core to git transition.
* po: Check that translated underlay directories exist before using them
for master language.
+ * po: Configuring the same language as master and slave confuses processing;
+ so filter out such a misconfiguration.
-- Joey Hess <joeyh@debian.org> Sun, 04 Apr 2010 12:17:11 -0400
# Change this when some incompatible change is made that requires
# rebuilding all wikis.
-firstcompat=3.20100406
+firstcompat=3.20100410
if [ "$1" = configure ] && \
dpkg --compare-versions "$2" lt "$firstcompat"; then
that that's what Xapian wants anyway (which is why I didn't change it),
but I could be wrong...
+ > AFAICS, this if anything, fixes a bug, xapian definitely expects
+ > unescaped text here. --[[Joey]]
+
* Page descriptions in the HTML `<head>` were previously double-escaped:
the description was stored escaped with numeric entities, then that was
output with a second layer of escaping! In this branch, I just emit
contained markup could appear unescaped on any page that inlines them
in `quick=yes` mode, and is rebuilt for some other reason. The failure
mode here would be too little escaping, i.e. cross-site scripting.
+
+[[!tag done]]
use warnings;
use strict;
-use Test::More tests => 10;
+use Test::More tests => 7;
BEGIN { use_ok("IkiWiki"); }
BEGIN { use_ok("IkiWiki::Plugin::tag"); }
ok(pagespec_match("one", "link(tags/numbers)"));
ok(pagespec_match("one", "link(alpha)"));
-ok(pagespec_match("one", "typedlink(tag tags/numbers)"));
-ok(!pagespec_match("one", "typedlink(tag tags/letters)"));
-# invalid syntax
-ok(pagespec_match("one", "typedlink(tag)")->isa("IkiWiki::ErrorReason"));
-
1;