diff options
-rw-r--r-- | IkiWiki/Plugin/meta.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index 81355ef6d..02c99e9f6 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -85,7 +85,13 @@ sub preprocess (@) { #{{{ # fallthrough } elsif ($key eq 'uuid') { - $pagestate{$page}{meta}{uuid}=HTML::Entities::encode_numeric($value); + my $abs = $value; + + if ($abs =~ m/^[[:xdigit:]]{8}-[[:xdigit:]]{4}-[[:xdigit]]{4}-[[:xdigit:]]{4}-[[:xdigit:]]{12}$/) { + $abs = lc "urn:uuid:$abs"; + } + + $pagestate{$page}{meta}{uuid}=HTML::Entities::encode_numeric($abs); # fallthrough } elsif ($key eq 'license') { |