Changeset 23463 for main/trunk
- Timestamp:
- 2010-12-13T15:24:36+13:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugins/HTMLPlugin.pm
r23419 r23463 710 710 $self->replace_usemap_links($1, $2, $3)/isge; 711 711 712 $$textref =~ s/(<(?:a|area|frame|link|script)\s+[^>]*?\s*(?:href|src)\s*=\s* [\"\']?)([^\"\'>\s]+)([\"\']?[^>]*>)/713 $self->replace_href_links ($1, $2, $3, $base_dir, $file, $doc_obj, $cursection)/isge; 712 $$textref =~ s/(<(?:a|area|frame|link|script)\s+[^>]*?\s*(?:href|src)\s*=\s*)((?:[\"][^\"]+[\"])|(?:[\'][^\']+[\'])|(?:[^\s\/>]+))([^>]*>)/ 713 $self->replace_href_links ($1, $2, $3, $base_dir, $file, $doc_obj, $cursection)/isge; 714 714 715 715 ## $$textref =~ s/($opencom.*?)?+(<(?:a|area|frame|link|script)\s+[^>]*?\s*(?:href|src)\s*=\s*)((?:[\"][^\"]+[\"])|(?:[\'][^\']+[\'])|(?:[^\s\/>]+))([^>]*>)(.*?$closecom)?+/ … … 798 798 my $self = shift (@_); 799 799 my ($front, $link, $back, $base_dir, $file, $doc_obj, $section) = @_; 800 800 801 801 # remove quotes from link at start and end if necessary 802 802 if ($link=~/^[\"\']/) { … … 1039 1039 # strip off hash part, e.g. #foo, but watch out for any entities, e.g. α 1040 1040 my ($before_hash, $hash_part) = $link =~ m/^(.*?[^&])(\#.*)?$/; 1041 1041 1042 1042 $hash_part = "" if !defined $hash_part; 1043 1043 if (!defined $before_hash || $before_hash !~ m/[\w\.\/]/) { 1044 my $outhandle = $self->{'outhandle'};1045 print $outhandle "HTMLPlugin: ERROR - badly formatted tag ignored ($link)\n"1046 1047 return ($link, "", 0);1048 } 1049 1044 my $outhandle = $self->{'outhandle'}; 1045 print $outhandle "HTMLPlugin: ERROR - badly formatted tag ignored ($link)\n" 1046 if $self->{'verbosity'}; 1047 return ($link, "", 0); 1048 } 1049 1050 1050 if ($before_hash =~ s@^((?:http|https|ftp|file|mms)://)@@i) { 1051 my $type = $1;1051 my $type = $1; 1052 1052 1053 1053 if ($link =~ m/^(http|ftp):/i) {
Note:
See TracChangeset
for help on using the changeset viewer.