diff --git a/core/lib/Foswiki/Store.pm b/core/lib/Foswiki/Store.pm index 664ac98959..902bb2b219 100644 --- a/core/lib/Foswiki/Store.pm +++ b/core/lib/Foswiki/Store.pm @@ -203,6 +203,12 @@ sub getAttachmentURL { my $url = $Foswiki::cfg{PubUrlPath} || ''; my @params; + if ( $options{topic} ) { + ( $options{web}, $options{topic} ) = + Foswiki::Func::normalizeWebTopicName( $options{web}, + $options{topic} ); + } + if ( $options{web} ) { $url .= '/' . Foswiki::urlEncode( $options{web} ); delete $options{web};