X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/c65658eeb5cd83417f3ec1c69eff2ebcd6a481db..d5c680e693def6d59fcb7c8831356d5acad14cae:/IkiWiki/Plugin/attachment.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/attachment.pm b/IkiWiki/Plugin/attachment.pm index 9c774557f..ce688ca40 100644 --- a/IkiWiki/Plugin/attachment.pm +++ b/IkiWiki/Plugin/attachment.pm @@ -134,9 +134,12 @@ sub formbuilder (@) { } } + $filename=IkiWiki::basename($filename); + $filename=~s/.*\\+(.+)/$1/; # hello, windows + $filename=linkpage(IkiWiki::possibly_foolish_untaint( attachment_location($form->field('page')). - IkiWiki::basename($filename))); + $filename)); if (IkiWiki::file_pruned($filename)) { error(gettext("bad attachment filename")); }