Changeset 732 for trunk/gsdl/perllib/plugins/HTMLPlug.pm
- Timestamp:
- 1999-10-20T17:23:48+13:00 (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/perllib/plugins/HTMLPlug.pm
r721 r732 263 263 $text =~ s/\s+/ /g; 264 264 265 # see if there's a <title> tag266 265 my $foundtitle = 0; 267 if ($text =~ /<title[^>]*>([^<]*)<\/title[^>]*>/i) { 268 if (defined $1) { 269 my $title = $1; 270 if ($title =~ /\w/) { 271 $doc_obj->add_metadata ($cursection, "Title", $title); 272 $foundtitle = 1; 266 # don't use title tag if Title has been passed 267 # in from another plugin 268 if (defined $metadata->{'Title'}) { 269 $foundtitle = 1; 270 } 271 if (!$foundtitle) { 272 # see if there's a <title> tag 273 if ($text =~ /<title[^>]*>([^<]*)<\/title[^>]*>/i) { 274 if (defined $1) { 275 my $title = $1; 276 if ($title =~ /\w/) { 277 $doc_obj->add_metadata ($cursection, "Title", $title); 278 $foundtitle = 1; 279 } 273 280 } 274 281 }
Note:
See TracChangeset
for help on using the changeset viewer.