Ignore:
Timestamp:
2005-04-26T22:29:05+12:00 (19 years ago)
Author:
davidb
Message:

Encountered new circumstance -- table -- for HTML tags that reference image.
These can be in either <table> <tr> or <td> and use the attribute 'background'.
Seems to be informally sorted by Netscape and IE but have my doubts over
whether or not it is in the standard. Have added addtional RE processing
to HTMLPlug that caters for these tags with this attribute.

File:
1 edited

Legend:

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

    r9228 r9747  
    183183    my @link_matches = ($$textref =~ m/<link[^>]*?href\s*=\s*($attval)[^>]*>/igs);
    184184    my @embed_matches = ($$textref =~ m/<embed[^>]*?src\s*=\s*($attval)[^>]*>/igs);
    185 
    186     foreach my $link (@img_matches, @usemap_matches, @link_matches, @embed_matches) {
     185    my @tabbg_matches = ($$textref =~ m/<(?:table|tr|td)[^>]*?background\s*=\s*($attval)[^>]*>/igs);
     186
     187    foreach my $link (@img_matches, @usemap_matches, @link_matches, @embed_matches, @tabbg_matches) {
    187188
    188189    # remove quotes from link at start and end if necessary
     
    408409
    409410    # allow spaces if inside quotes - jrm21
    410     $$textref =~ s/(<(?:img|embed)[^>]*?src\s*=\s*)(\"[^\"]+\"|[^\s>]+)([^>]*>)/
     411    $$textref =~ s/(<(?:img|embed|table|tr|td)[^>]*?(?:src|background)\s*=\s*)(\"[^\"]+\"|[^\s>]+)([^>]*>)/
    411412    $self->replace_images ($1, $2, $3, $base_dir, $file, $doc_obj, $cursection)/isge;
    412413
Note: See TracChangeset for help on using the changeset viewer.