I am attempting to include an HTML file attached to a topic via
%INCLUDE{"%ATTACHURL%/ssd5.fit.html"}%
This works fine in a top level web, but when used in a subweb I get the dreaded
Warning
This site does not allow %INCLUDE% of URLs
error.
I've attached a patch to TWiki.pm that seems to fix the problem
--
TWiki:Main.DiabJerius - 29 Apr 2008
Can there be more than one layer of subwebs (e.g. Sandbox/A/B/...)? If so, the patch isn't complete; changing the second '?' to a '*'. in the regular expression should do the trick.
--
TWiki:Main.DiabJerius - 30 Apr 2008
Yes, there can be many layers, and you should use the
$TWiki::regex
regular expressions in that RE, but apart from that your analysis is spot on. Confirmed.
--
CrawfordCurrie - 30 Apr 2008
I will fix this using a twiki.pm regex also
testing the code already
--
KennethLavrsen - 01 May 2008
Fixed. Thanks Diab for the analysis. I changed the fix to use the regex for web names
if( $url =~ /^$this->{urlHost}$TWiki::cfg{PubUrlPath}\/($regex{webNameRegex})\/([^\/\.]+)\/([^\/]+)$/ ) {
--
KennethLavrsen - 01 May 2008