[Rt-commit] rt branch, 3.8/signature-fckeditor-fix, updated. rt-3.8.9-14-gd44f9b4

? sunnavy sunnavy at bestpractical.com
Thu Feb 24 23:12:21 EST 2011


The branch, 3.8/signature-fckeditor-fix has been updated
       via  d44f9b476f0471f97f04c64ce603008c9ed2d3a8 (commit)
      from  5a62cc5ae9b6d43322b65fdbdad3f34c882b3e15 (commit)

Summary of changes:
 lib/RT/Interface/Web.pm |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

- Log -----------------------------------------------------------------
commit d44f9b476f0471f97f04c64ce603008c9ed2d3a8
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Feb 25 12:09:50 2011 +0800

    escape exactly the same things that FCKEditor does when comparing sigs, see also #16691

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 8c3884f..e367a0e 100755
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -841,8 +841,13 @@ 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 );
+    # Check for html-formatted sig; we don't use EscapeUTF8 here
+    # because we want to precisely match the escaping that FCKEditor
+    # uses. see also 311223f5, which fixed this for 4.0
+    $sig =~ s/&/&amp;/g;
+    $sig =~ s/</&lt;/g;
+    $sig =~ s/>/&gt;/g;
+
     return ''
       if $html
           and $content =~ m{^(?:<p>)?(--)?\Q$sig\E(?:</p>)?$}s;

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


More information about the Rt-commit mailing list