Changeset 8366


Ignore:
Timestamp:
2004-10-18T16:17:11+13:00 (20 years ago)
Author:
kjdon
Message:

added script to the list of tags to process as relative links, and js to the list of file extensions to block - so can include javascript files along with the html file. courtesy Dmitry Vereschaka

File:
1 edited

Legend:

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

    r8225 r8366  
    138138}
    139139
    140 
     140# may want to use (?i)\.(gif|jpe?g|jpe|png|css|js(?:@.*)?)$
     141# if have eg <script language="javascript" src="img/lib.js@123">
    141142sub get_default_block_exp {
    142143    my $self = shift (@_);
    143144
    144     return q^(?i)\.(gif|jpe?g|jpe|png|css)$^;
     145    return q^(?i)\.(gif|jpe?g|jpe|png|css|js)$^;
    145146}
    146147
     
    317318        $self->replace_usemap_links($1, $2, $3)/isge;
    318319
    319     $$textref =~ s/(<(?:a|area|frame|link)\s+[^>]*?\s*(?:href|src)\s*=\s*\"?)([^\">\s]+)(\"?[^>]*>)/
     320    $$textref =~ s/(<(?:a|area|frame|link|script)\s+[^>]*?\s*(?:href|src)\s*=\s*\"?)([^\">\s]+)(\"?[^>]*>)/
    320321        $self->replace_href_links ($1, $2, $3, $base_dir, $file, $doc_obj, $cursection)/isge;
    321322    }
Note: See TracChangeset for help on using the changeset viewer.