From 4b64a1409ce47043a47b9cd9d88e0a1867ac55eb Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 12 Dec 2005 06:25:31 +0000 Subject: [PATCH] fix double encoded HTML entities re sf#1372630 --- docs/changelog/6.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/SyndicatedContent.pm | 3 +++ 2 files changed, 4 insertions(+) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 9ac49f4e6..1dfe1cb7d 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -7,6 +7,7 @@ - fix [ 1377276 ] Calendar Pop up issue - fix [ 1376621 ] dateSubmitted not updated on posts - fix [ 1344111 ] promote/demote swap with non-"published" assets + - fix [ 1372630 ] Syndicated encode "&" also if belong to a HTML entity - removed server version tag appending. Could re-add as an setting later. (along with the Style.pm header tag version number insertion). - fixed poll's editForm so an option only showed up at the proper time. diff --git a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm index 9cc7afb76..7e2b3400e 100644 --- a/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm +++ b/lib/WebGUI/Asset/Wobject/SyndicatedContent.pm @@ -156,6 +156,9 @@ sub _strip_html { $_[0] =~ s/\<//g; $_[0] = WebGUI::HTML::filter($_[0], 'all'); + ##Unencode double encoded entities. This is usually done + ##by passing XML::RSSLite an already encoded entity. + $_[0] =~ s/\&(?=(#[0-9]+|#x[0-9a-fA-F]+|\w+);)/&/g; } }