[Rt-commit] rt branch, 4.0.0-releng, updated. rt-4.0.0rc4-3-g311223f

Alex Vandiver alexmv at bestpractical.com
Sun Jan 23 01:37:15 EST 2011


The branch, 4.0.0-releng has been updated
       via  311223f5a7177a2646ebbef0106e6fef7433d419 (commit)
       via  593e39b2206304f1937ad718830d940f0955e036 (commit)
      from  e1135a623752df6b7664463902be788d20910dbb (commit)

Summary of changes:
 lib/RT/Interface/Web.pm  |   15 ++++++++++-----
 share/html/Elements/Tabs |    2 +-
 2 files changed, 11 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 593e39b2206304f1937ad718830d940f0955e036
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Sun Jan 23 01:04:17 2011 -0500

    Queue= takes priority over id=, otherwise the menu breaks in queue scrips

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 7a1dc9c..a7eb207 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -244,7 +244,7 @@ my $build_admin_menu = sub {
                 ||
               $m->request_args->{'Queue'} && $m->request_args->{'Queue'} =~ /^\d+$/ 
                 ) {
-            my $id = $m->request_args->{'id'} || $m->request_args->{'Queue'};
+            my $id = $m->request_args->{'Queue'} || $m->request_args->{'id'};
             my $queue_obj = RT::Queue->new( $session{'CurrentUser'} );
             $queue_obj->Load($id);
 

commit 311223f5a7177a2646ebbef0106e6fef7433d419
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Sun Jan 23 01:36:07 2011 -0500

    Escape exactly the same things that FCKEditor does when comparing sigs

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 2395cba..023e95a 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -896,11 +896,16 @@ sub StripContent {
     # Check for plaintext sig
     return '' if not $html and $content =~ /^(--)?\Q$sig\E$/;
 
-    # Check for html-formatted sig
-    RT::Interface::Web::EscapeUTF8( \$sig );
-    return ''
-      if $html
-          and $content =~ m{^(?:<p>)?(--)?\Q$sig\E(?:</p>)?$}s;
+    # Check for html-formatted sig; we don't use EscapeUTF8 here
+    # because we want to precisely match the escapting that FCKEditor
+    # uses.
+    $sig =~ s/&/&amp;/g;
+    $sig =~ s/</&lt;/g;
+    $sig =~ s/>/&gt;/g;
+    $sig =~ s/"/&quot;/g;
+    warn "Got:\n$content\n";
+    warn "Sig is:\n$sig\n";
+    return '' if $html and $content =~ m{^(?:<p>)?(--)?\Q$sig\E(?:</p>)?$}s;
 
     # Pass it through
     return $return_content;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list