Changeset 12812


Ignore:
Timestamp:
10/20/11 15:21:23 (19 months ago)
Author:
OlivierRaginel
Message:

Item11189: Then commit the ugly fix. We really need to do better than this, but it is way too complex (too many cases) to be done nicely

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/core/lib/Foswiki/Render.pm

    r12783 r12812  
    795795        # [[$link][$text]] 
    796796        $hasExplicitLinkLabel = 1; 
    797         $text                 = _escapeAutoLinks($text); 
     797        if ( $text =~ /^[^?]*\.(gif|jpg|jpeg|png)$/i ) { 
     798            my $filename = $text; 
     799            $filename =~ s@.*/@@; 
     800            $text = CGI::img( { src => $text, alt => $filename } ); 
     801        } 
     802        else { 
     803            $text                 = _escapeAutoLinks($text); 
     804        } 
    798805    } 
    799806 
Note: See TracChangeset for help on using the changeset viewer.