From 81a0e4d074b178fdc513b51ebd9196b53d85a5d6 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Sun, 17 Apr 2011 22:17:52 +0200 Subject: Permit unsafe JavaScript handling in meta.pm. --- IkiWiki/Plugin/meta.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'IkiWiki') diff --git a/IkiWiki/Plugin/meta.pm b/IkiWiki/Plugin/meta.pm index e7b96bd..ebbf4d7 100644 --- a/IkiWiki/Plugin/meta.pm +++ b/IkiWiki/Plugin/meta.pm @@ -194,11 +194,12 @@ sub preprocess (@) { elsif ($key eq 'script') { my $defer=exists $params{defer} ? ' defer="defer"' : ''; my $async=exists $params{async} ? ' async="async"' : ''; + my $srcurl=$value; my $js=bestlink($page, $value.".js"); - if (! length $js) { - error gettext("script not found"); + if (length $js) { + $srcurl=urlto($js, $page); } - push @{$metaheaders{$page}}, scrub('', $page, $destpage); } -- cgit v1.2.3