Changeset 16638
- Timestamp:
- 2008-08-04T12:32:24+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/HTMLPlugin.pm
r16632 r16638 585 585 my @embed_matches = ($$textref =~ m/<embed[^>]*?src\s*=\s*($attval)[^>]*>/igs); 586 586 my @tabbg_matches = ($$textref =~ m/<(?:table|tr|td)[^>]*?background\s*=\s*($attval)[^>]*>/igs); 587 588 foreach my $link (@img_matches, @usemap_matches, @link_matches, @embed_matches, @tabbg_matches) { 587 my @script_matches = ($$textref =~ m/<script[^>]*?src\s*=\s*($attval)[^>]*>/igs); 588 589 foreach my $link (@img_matches, @usemap_matches, @link_matches, @embed_matches, @tabbg_matches, @script_matches) { 589 590 590 591 # remove quotes from link at start and end if necessary … … 595 596 596 597 $link =~ s/\#.*$//s; # remove any anchor names, e.g. foo.html#name becomes foo.html 598 # some links may just be anchor names 599 next unless ($link =~ /\S+/); 597 600 598 601 if ($link !~ m@^/@ && $link !~ m/^([A-Z]:?)\\/) { … … 602 605 } 603 606 $link = $self->eval_dir_dots($link); 607 608 # Replace %XX's in URL with decoded value if required. 609 # Note that the filename may include the %XX in some situations 610 if ($link =~ m/\%[A-F0-9]{2}/i) { 611 if (!-e $link) { 612 $link =~ s/\%([A-F0-9]{2})/pack('C', hex($1))/ige; 613 } 614 } 604 615 605 616 $block_hash->{'file_blocks'}->{$link} = 1;
Note:
See TracChangeset
for help on using the changeset viewer.