Changeset 2695 for trunk/gsdl


Ignore:
Timestamp:
2001-08-13T11:42:33+12:00 (23 years ago)
Author:
jrm21
Message:

Allow spaces in img src=... tags if surrounded with dbl quotes.

File:
1 edited

Legend:

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

    r2564 r2695  
    168168    # trap images
    169169
    170     $$textref =~ s/(<img[^>]*?src\s*=\s*\"?)([^\">\s]+)(\"?[^>]*>)/
     170    # allow spaces if inside quotes - jrm21
     171    $$textref =~ s/(<img[^>]*?src\s*=\s*)(\"[^\"]+\"|[^\s>]+)([^>]*>)/
    171172    $self->replace_images ($1, $2, $3, $base_dir, $file, $doc_obj, $cursection)/isge;
    172173
     
    184185    my ($front, $link, $back, $base_dir,
    185186    $file, $doc_obj, $section) = @_;
    186    
     187    # remove quotes from link at start and end if necessary
     188    if ($link=~/^\"/) {
     189    $link=~s/^\"//;$link=~s/\"$//;
     190    $front.='"';
     191    $back="\"$back";
     192    }
     193
    187194    $link =~ s/\n/ /g;
    188195    my ($href, $hash_part, $rl) = $self->format_link ($link, $base_dir, $file);
Note: See TracChangeset for help on using the changeset viewer.