Changeset 6649


Ignore:
Timestamp:
2004-01-28T16:13:18+13:00 (20 years ago)
Author:
kjdon
Message:

changed the regex for getting info out of meta tags so it now works if the content attribute comes before the name attribute

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/HTMLPlug.pm

    r6408 r6649  
    604604    if (defined $self->{'hunt_creator_metadata'}) {
    605605    for my $name (split /,/, "AUTHOR,AUTHOR.EMAIL,CREATOR,DC.CREATOR,DC.CREATOR.CORPORATENAME") {
    606         if ($$textref =~ /<meta(\s*?)(?:name|http-equiv)\s*=\s*\"?$name\"?([^>]*)/is) {
     606        #if ($$textref =~ /<meta(\s*?)(?:name|http-equiv)\s*=\s*\"?$name\"?([^>]*)/is) {
     607        if ($$textref =~ /<meta(.*?)(?:name|http-equiv)\s*=\s*\"?$name\"?([^>]*)/is) {
    607608        my $content = $1 . $2;
    608609        if ($content =~ /content\s*=\s*\"?(.*)\"?/is) {
     
    628629
    629630    # see if there's a <meta> tag for this field
    630     while ($$textref =~ /<meta(\s*?)(?:name|http-equiv)\s*=\s*\"?$field\"?([^>]*)/isg) {
     631    #while ($$textref =~ /<meta(\s*?)(?:name|http-equiv)\s*=\s*\"?$field\"?([^>]*)/isg) {
     632    while ($$textref =~ /<meta(.*?)(?:name|http-equiv)\s*=\s*\"?$field\"?([^>]*)/isg) {
    631633        my $content = $1 . $2;
    632634        if ($content =~ /content\s*=\s*\"?(.*)\"?/is) {
Note: See TracChangeset for help on using the changeset viewer.