diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 2e1089b9f..bfac2613b 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -19,6 +19,7 @@ - use UTF8 JSON encoding and decoding universally - fixed: Import/Export of packages with international text is broken - fixed: CS rating links are exposed to site spiders + - improved behavior of CS mail message filtering 7.5.8 - moved Gallery utility methods to WebGUI::Utility::Gallery diff --git a/lib/WebGUI/Asset/Wobject/HttpProxy.pm b/lib/WebGUI/Asset/Wobject/HttpProxy.pm index 549ab1901..a52a33555 100644 --- a/lib/WebGUI/Asset/Wobject/HttpProxy.pm +++ b/lib/WebGUI/Asset/Wobject/HttpProxy.pm @@ -399,7 +399,7 @@ sub view { $var{content} = sprintf $i18n->get('no frame error message'), $proxiedUrl; } else { $var{content} =~ s/\//isg if ($self->get("removeStyle")); - $var{content} = WebGUI::HTML::cleanSegment($var{content}); + $var{content} = WebGUI::HTML::cleanSegment($var{content}, 1); $var{content} = WebGUI::HTML::filter($var{content}, $self->get("filterHtml")); } } diff --git a/lib/WebGUI/HTML.pm b/lib/WebGUI/HTML.pm index cf60e873b..68301e5c1 100644 --- a/lib/WebGUI/HTML.pm +++ b/lib/WebGUI/HTML.pm @@ -46,40 +46,36 @@ These methods are available from this package: #------------------------------------------------------------------- -=head2 cleanSegment ( html ) +=head2 cleanSegment ( html , preserveStyleScript ) Returns an HTML segment that has been stripped of the tag and anything before it, as well as the tag and anything after it. It's main purpose is to get rid of META tags and other garbage from an HTML page that will be used as a segment inside of another page. -B This filter does have one exception, it leaves anything before the tag that is enclosed in or tags. - =head3 html The HTML segment you want cleaned. +=head3 preserveStyleScript + +With this option set,