[Rt-commit] rt branch 5.0/fix-empty-updates-sending-emails-with-html-signatures created. rt-5.0.4-5-g0729836988
BPS Git Server
git at git.bestpractical.com
Wed May 10 12:39:45 UTC 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/fix-empty-updates-sending-emails-with-html-signatures has been created
at 07298369880cfcaf32f90d0d89d1cead5330179d (commit)
- Log -----------------------------------------------------------------
commit 07298369880cfcaf32f90d0d89d1cead5330179d
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Wed May 10 09:15:40 2023 -0300
Fix empty updates sending emails with html signatures
Most recent versions of CKEditor are escaping html differently than
old FCKEditor. This commit fixes the StripContent method to strip
and compare html in the new format.
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 444eb1c24e..6194135362 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -1299,15 +1299,11 @@ sub StripContent {
# Check for plaintext sig
return '' if not $html and $content =~ /^(--)?\Q$sig\E$/;
- # Check for html-formatted sig; we don't use EscapeHTML here
- # because we want to precisely match the escapting that FCKEditor
- # uses.
- $sig =~ s/&/&/g;
- $sig =~ s/</</g;
- $sig =~ s/>/>/g;
- $sig =~ s/"/"/g;
- $sig =~ s/'/'/g;
- return '' if $html and $content =~ m{^(?:<p>)?(--)?\Q$sig\E(?:</p>)?$}s;
+ $sig =~ s! !!g;
+ $sig =~ s!<br/?>!!g;
+ return ''
+ if $html
+ and $content =~ m{^(?:<p>)?(--)(?:<\/p>)?\Q$sig\E(?:</p>)?$}s;
# Pass it through
return $return_content;
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list