[Rt-commit] r17976 - in rt/3.999/branches/merge_to_3.8.2: .
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Jan 28 22:34:36 EST 2009
Author: sunnavy
Date: Wed Jan 28 22:34:35 2009
New Revision: 17976
Modified:
rt/3.999/branches/merge_to_3.8.2/ (props changed)
rt/3.999/branches/merge_to_3.8.2/share/html/Elements/MakeClicky
Log:
r19136 at sunnavys-mb: sunnavy | 2009-01-29 10:25:27 +0800
merged share/html/Elements/MakeClicky
Modified: rt/3.999/branches/merge_to_3.8.2/share/html/Elements/MakeClicky
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/Elements/MakeClicky (original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/Elements/MakeClicky Wed Jan 28 22:34:35 2009
@@ -125,20 +125,28 @@
</%ONCE>
<%ARGS>
$content => undef
+$html => undef
</%ARGS>
<%INIT>
return unless defined $$content;
unless ( $regexp ) {
- RT::Interface::Web::escape_utf8( $content );
+ RT::Interface::Web::EscapeUTF8( $content ) unless $html;
return;
}
my $pos = 0;
while ( $$content =~ /($regexp)/gsio ) {
my $match = $1;
+ next if $` =~ /href=(?:"|")$/;
my $skipped_len = pos($$content) - $pos - length($match);
if ( $skipped_len > 0 ) {
- my $plain = $escaper->( substr( $$content, $pos, $skipped_len ) );
+ my $plain;
+ if ( $html ) {
+ $plain = substr( $$content, $pos, $skipped_len );
+ }
+ else {
+ $plain = $escaper->( substr( $$content, $pos, $skipped_len ) )
+ }
substr( $$content, $pos, $skipped_len ) = $plain;
$pos += length($plain);
}
@@ -151,7 +159,8 @@
pos($$content) = ( $pos += length($plain) );
}
-substr( $$content, $pos ) = $escaper->( substr( $$content, $pos ) ) unless $pos == length $$content;
+substr( $$content, $pos ) = $escaper->( substr( $$content, $pos ) ) unless
+($pos == length $$content) || $html;
pos($$content) = 0;
More information about the Rt-commit
mailing list