diff options
Diffstat (limited to 'IkiWiki/Plugin/meta.pm')
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 5941e3f3f..5cfa72833 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -198,8 +198,12 @@ sub preprocess (@) { '" rel="openid2.local_id" />' if $delegate ne 1; } if (exists $params{"xrds-location"} && safeurl($params{"xrds-location"})) { - push @{$metaheaders{$page}}, '<meta http-equiv="X-XRDS-Location"'. - 'content="'.encode_entities($params{"xrds-location"}).'" />'; + # force url absolute + eval q{use URI}; + error($@) if $@; + my $url=URI->new_abs($params{"xrds-location"}, $config{url}); + push @{$metaheaders{$page}}, '<meta http-equiv="X-XRDS-Location" '. + 'content="'.encode_entities($url).'" />'; } } elsif ($key eq 'redir') { |