Changeset 12889


Ignore:
Timestamp:
10/26/11 13:08:08 (7 months ago)
Author:
OlivierRaginel
Message:

Item11189: Link test should be able to contain someting.jpg without it being interpreted: test that it starts with https?:, and that it does not contain a <nop>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Release01x01/core/lib/Foswiki/Render.pm

    r12818 r12889  
    894894    my ( $this, $url ) = @_; 
    895895 
     896    return if $url =~ /<nop>/; 
    896897    $url =~ s/^\s+//; 
    897898    $url =~ s/\s+$//; 
    898     if ( $url =~ /^[^?]*\.(?:gif|jpg|jpeg|png)$/i ) { 
     899    if ( $url =~ m#^https?://[^?]*\.(?:gif|jpg|jpeg|png)$#i ) { 
    899900        my $filename = $url; 
    900901        $filename =~ s@.*/@@; 
Note: See TracChangeset for help on using the changeset viewer.