Changeset 8914
- Timestamp:
- 2005-01-20T10:13:30+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/HTMLPlug.pm
r8843 r8914 33 33 # (it's removed by this plugin) 34 34 # 35 36 35 37 36 package HTMLPlug; … … 144 143 sub get_default_block_exp { 145 144 my $self = shift (@_); 146 145 147 146 return q^(?i)\.(gif|jpe?g|jpe|jpg|png|css)$^; 148 147 } … … 150 149 sub get_default_process_exp { 151 150 my $self = shift (@_); 152 151 153 152 # the last option is an attempt to encode the concept of an html query ... 154 153 return q^(?i)(\.html?|\.shtml|\.shm|\.asp|\.php\d?|\.cgi|.+\?.+=.*)$^; 155 154 } 155 156 156 157 157 sub metadata_read { … … 170 170 } 171 171 172 # Do encoding stuff 173 my ($language, $encoding) = $self->textcat_get_language_encoding ($filename); 172 if ($self->{'smart_block'}) { 173 # Do encoding stuff 174 my ($language, $encoding) = $self->textcat_get_language_encoding ($filename); 174 175 175 # read in file ($text will be in utf8) 176 my $text = ""; 177 $self->read_file ($filename, $encoding, $language, \$text); 178 179 $self->store_block_files (\$text, $filename); 180 176 # read in file ($text will be in utf8) 177 my $text = ""; 178 $self->read_file ($filename, $encoding, $language, \$text); 179 $self->store_block_files (\$text, $filename); 180 } 181 181 return 1; 182 182 } … … 463 463 my ($filename) = $href =~ /^(?:.*?):(?:\/\/)?(.*)/; 464 464 465 465 466 ##### leave all these links alone (they won't be picked up by intermediate 466 467 ##### pages). I think that's safest when dealing with frames, targets etc. … … 609 610 $before_hash .= "/" if (-d $linkfilename); 610 611 } 611 612 612 return ("http://" . $before_hash, $hash_part, 1); 613 613 } else {
Note:
See TracChangeset
for help on using the changeset viewer.