Skip Menu |

This queue is for tickets about the Text-Trac CPAN distribution.

Report information
The Basics
Id: 43337
Status: resolved
Priority: 0/
Queue: Text-Trac

People
Owner: miya [...] mizzy.org
Requestors: corey [...] omniti.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: URLs ending in .png, .gif, or .jpg should not be converted to embedded images
Text::Trac converts links ending in an image extension to an embedded image, but this behavior was removed from Trac three years ago (see http://trac.edgewall.org/ticket/2183 ) and isn't the expected behavior anymore.
Subject: imagelink.diff
Index: t/01-text-trac.t =================================================================== --- t/01-text-trac.t (revision 1184) +++ t/01-text-trac.t (revision 1185) @@ -235,16 +235,6 @@ <a class="ext-link" href="http://mizzy.org/"><span class="icon"></span>Title</a> </p> -### auto image link test ---- input -http://mizzy.org/test.png -[http://mizzy.org/test.png Image] ---- expected -<p> -<img src="http://mizzy.org/test.png" alt="http://mizzy.org/test.png" /> -<img src="http://mizzy.org/test.png" alt="Image" /> -</p> - ### ul node with single space --- input * indent with Index: lib/Text/Trac/InlineNode.pm =================================================================== --- lib/Text/Trac/InlineNode.pm (revision 1184) +++ lib/Text/Trac/InlineNode.pm (revision 1185) @@ -41,9 +41,6 @@ \\] "; -my $img_re = qr/\.(?:gif|jpe?g|png)(?:\?.*)?$/i; - - my $rules = join '|', ( map { "($_)" } ( keys %token_table ) ); $rules = qr/$rules/x; @@ -289,9 +286,6 @@ my $title_attr = $title ? qq{title="$title"} : ''; $title ||= $text; - if ( $url =~ $img_re ) { - return qq{<img src="$url" alt="$title" />}; - } my $local = $self->{context}->{local} || ''; if ( $url !~ /^$local/ or !$local ) {
Fixed and released as 0.14.Thanks!