[Rt-commit] r9031 - rt/branches/3.7-EXPERIMENTAL/html/Elements

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Sep 13 08:45:13 EDT 2007


Author: sunnavy
Date: Thu Sep 13 08:45:13 2007
New Revision: 9031

Modified:
   rt/branches/3.7-EXPERIMENTAL/html/Elements/MakeClicky

Log:
fixed the action result of httpurl('[Open URL]' not 'open URL').
also some tiny changes.

Modified: rt/branches/3.7-EXPERIMENTAL/html/Elements/MakeClicky
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/html/Elements/MakeClicky	(original)
+++ rt/branches/3.7-EXPERIMENTAL/html/Elements/MakeClicky	Thu Sep 13 08:45:13 2007
@@ -55,7 +55,8 @@
     },
     url => sub {
         my %args = @_;
-        my $result = qq{[<a target="new" href="$args{value}">}. loc('open URL') .qq{</a>]};
+        my $result = qq{[<a target="new" href="$args{value}">}. '[' .
+                        loc('Open URL') . ']' .qq{</a>]};
         return $args{value} . qq{ <span class="clickylink">$result</span>};
     },
     url_overwrite => sub {
@@ -140,13 +141,13 @@
     if ( $skipped_len > 0 ) {
         my $plain = $escaper->( substr( $$content, $pos, $skipped_len ) );
         substr( $$content, $pos, $skipped_len ) = $plain;
-        $pos += ( $skipped_len = length($plain) );
-    }
-    {
-        my $plain = $handle->( %ARGS, value => $match );
-        substr( $$content, $pos, length($match) ) = $plain;
-        pos($$content) = ( $pos += length($plain) );
+        $pos += length($plain);
     }
+
+    my $plain = $handle->( %ARGS, value => $match );
+    substr( $$content, $pos, length($match) ) = $plain;
+    pos($$content) = ( $pos += length($plain) );
+
 }
 substr( $$content, $pos ) = $escaper->( substr( $$content, $pos ) ) unless $pos == length $$content;
 


More information about the Rt-commit mailing list