Changeset 12941


Ignore:
Timestamp:
2006-09-29T15:10:00+12:00 (18 years ago)
Author:
mdewsnip
Message:

Now removes extra <br /> tags from end of place narrative, and removes empty <i> </i> tags in HTML generated from RTF.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cic-hcap/perllib/plugins/CICPlug.pm

    r12939 r12941  
    502502
    503503    # Prepare SQL statement for getting everything from the Place table
    504     my $place_sql_statement = "SELECT * FROM tblPlace";
     504    my $place_sql_statement = "SELECT * FROM tblPlace";  # WHERE Entry_ID<100";
    505505    my $place_sql_handle = $dbh->prepare($place_sql_statement);
    506506    $place_sql_handle->{LongReadLen} = 65536;
     
    805805    if (defined($place_narrative)) {
    806806        my $place_narrative_html = &rtf_to_html($place_narrative);
    807         $place_narrative_html =~ s/<br \/>(\s|\n)*$//;  # Remove any trailing <br /> tags
     807        $place_narrative_html =~ s/(<br \/>(\s|\n)*)*$//;  # Remove any trailing <br /> tags
    808808        &new_metadata_entry($place_doc_obj, "PlaceNarrativeHTML", $place_narrative_html);
    809809    }
     
    10731073    }
    10741074
     1075    # Remove empty tags for HTML 4 compliance
     1076    $rtf_string =~ s/<i>\s*<\/i>/ /g;
     1077
    10751078    return $rtf_string;
    10761079}
Note: See TracChangeset for help on using the changeset viewer.