Changeset 30022
- Timestamp:
- 2015-07-14T21:09:32+12:00 (9 years ago)
- Location:
- main/trunk/greenstone2/perllib/plugins
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm
r29818 r30022 555 555 next; 556 556 } 557 print STDERR "** Dir 557 print STDERR "** DirectoryPlugin processing $raw_full_filename\n"; 558 558 # Follow Windows shortcuts 559 559 if ($raw_subfile =~ m/(?i)\.lnk$/ && (($ENV{'GSDLOS'} =~ m/^windows$/i) && ($^O ne "cygwin"))) { -
main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
r28319 r30022 283 283 print $outhandle " ->$unicode_url_original_filename\n"; 284 284 285 # Allow for possibility of raw byte version and Unicode versions of file 286 &util::block_filename($block_hash,$unicode_url_original_filename); 285 # make sure not to block the file itself, as happens when an html file links to itself 286 # e.g. if the current file is mary-boleyn/index.html and contains <link rel="canonical" href="index.html" /> 287 my $unicode_html_fname = ""; 288 $self->decode_text($html_fname,$content_encoding,$language,\$unicode_html_fname); 289 if($unicode_url_original_filename ne $unicode_html_fname) { 290 # Allow for possibility of raw byte version and Unicode versions of file 291 &util::block_filename($block_hash,$unicode_url_original_filename); 292 } 287 293 } 288 294 289 295 # $url_original_filename = &util::upgrade_if_dos_filename($url_original_filename); 290 &util::block_filename($block_hash,$url_original_filename); 296 &util::block_filename($block_hash,$url_original_filename) if $url_original_filename ne $html_fname; 297 298 # but only add the linked file to the blocklist if the current html file does not link to itself 291 299 292 300 }
Note:
See TracChangeset
for help on using the changeset viewer.