Changeset 13152 for trunk/cic-hcap


Ignore:
Timestamp:
2006-10-20T12:54:58+13:00 (18 years ago)
Author:
mdewsnip
Message:

Now removes extra less-than and greater-than characters, and catches another case where web addresses aren't correctly marked as hyperlinks.

File:
1 edited

Legend:

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

    r13109 r13152  
    882882    # Convert the place references from RTF to HTML
    883883    my $place_references_html_raw = &rtf_to_html($place_references_rtf_string);
    884     if ($place_references_html_raw =~ / (http|www\.)/) {
     884    if ($place_references_html_raw =~ /[ <](http|www\.)/) {
    885885    print STDERR "<ProcessingError n='Place $place_id' p='CICPlug' r='Warning: Found possible web address in references without hyperlink tag.'>\n" if ($self->{'gli'});
    886886    print STDERR "Warning: Place $place_id -- Found possible web address in references without hyperlink tag.\n";
     
    11041104    }
    11051105
     1106    # Remove extra less-than and greater-than symbols
     1107    $rtf_string =~ s/< </</g;
     1108    $rtf_string =~ s/<(<+)/</g;
     1109    $rtf_string =~ s/> >/>/g;
     1110    $rtf_string =~ s/>(>+)/>/g;
     1111
    11061112    # Remove empty tags for HTML 4 compliance
    11071113    $rtf_string =~ s/<i>\s*<\/i>/ /g;
Note: See TracChangeset for help on using the changeset viewer.