[Rt-commit] rt branch, 4.2/html-display-nits, created. rt-4.1.17-3-g3ceeea8
Thomas Sibley
trs at bestpractical.com
Fri Jul 12 20:27:35 EDT 2013
The branch, 4.2/html-display-nits has been created
at 3ceeea8c949e7b57e2a166b253b2335fea78424e (commit)
- Log -----------------------------------------------------------------
commit 5dd1b58fa0ca40175fb3f9bf00c3f3cfc3323dbb
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 12 12:52:29 2013 -0700
Not all Content-IDs are surrounded by <...>, such as those from Outlook
diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index 85963e5..c441838 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -1676,7 +1676,7 @@ sub RewriteInlineImages {
and $cid =~ s/^cid://i;
for my $attach (@{$args{Related}}) {
- if (($attach->GetHeader('Content-ID') || '') eq "<$cid>") {
+ if (($attach->GetHeader('Content-ID') || '') =~ /^(<)?\Q$cid\E(?(1)>)$/) {
push @rewritten, $attach->Id;
return "$args{AttachmentPath}/" . $attach->TransactionId . '/' . $attach->Id;
}
commit 3ceeea8c949e7b57e2a166b253b2335fea78424e
Author: Thomas Sibley <trs at bestpractical.com>
Date: Fri Jul 12 12:54:45 2013 -0700
Extend MakeClicky's HTML avoidance hack to avoiding anything that looks like an attribute
For example, alt="http://example.com" should never be auto-linked. This
was seen in the wild.
MakeClicky really needs to become fully HTML aware instead of resorting
to this hack, but for now this makes it incrementally better.
diff --git a/share/html/Elements/MakeClicky b/share/html/Elements/MakeClicky
index a34a896..404db70 100644
--- a/share/html/Elements/MakeClicky
+++ b/share/html/Elements/MakeClicky
@@ -139,7 +139,7 @@ unless ( $regexp ) {
my $pos = 0;
while ( $$content =~ /($regexp)/gsio ) {
my $match = $1;
- next if $` =~ /(?:href|src)=(?:"|")$/;
+ next if $` =~ /\w+=(?:"|")$/;
my $skipped_len = pos($$content) - $pos - length($match);
if ( $skipped_len > 0 ) {
my $plain;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list