From 07a205ffd62910c79e09c5fd5247868c4b163ec5 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Wed, 6 Jul 2011 13:23:26 +0000 Subject: fix for #341 --- .../protected/pages/Controls/SafeHtml.page | 4 ++++ .../pages/Controls/Samples/TSafeHtml/Home.page | 8 +++++++ framework/3rdParty/SafeHtml/TSafeHtmlParser.php | 9 ++++---- framework/Web/UI/WebControls/TSafeHtml.php | 27 +++++++++++++++++++--- 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/demos/quickstart/protected/pages/Controls/SafeHtml.page b/demos/quickstart/protected/pages/Controls/SafeHtml.page index 0bdea616..fb7ca46b 100644 --- a/demos/quickstart/protected/pages/Controls/SafeHtml.page +++ b/demos/quickstart/protected/pages/Controls/SafeHtml.page @@ -20,6 +20,10 @@ To use TSafeHtml, simply enclose the content to be secured within the TSafeHtml component tag in a template. The content may consist of both static text and PRADO controls. If the latter, the rendering result of the controls will be secured.

+

+If the content is encoded in UTF-7, you'll need to enable the RepackUTF7 property to ensure the contents gets parsed correctly. +

+ diff --git a/demos/quickstart/protected/pages/Controls/Samples/TSafeHtml/Home.page b/demos/quickstart/protected/pages/Controls/Samples/TSafeHtml/Home.page index cb681709..bf5947f9 100644 --- a/demos/quickstart/protected/pages/Controls/Samples/TSafeHtml/Home.page +++ b/demos/quickstart/protected/pages/Controls/Samples/TSafeHtml/Home.page @@ -20,6 +20,14 @@ Safeguard the control rendering results: + +Safeguard and UTF-7 string: + + + + + + diff --git a/framework/3rdParty/SafeHtml/TSafeHtmlParser.php b/framework/3rdParty/SafeHtml/TSafeHtmlParser.php index 36b28274..b80f31a6 100644 --- a/framework/3rdParty/SafeHtml/TSafeHtmlParser.php +++ b/framework/3rdParty/SafeHtml/TSafeHtmlParser.php @@ -24,7 +24,7 @@ Prado::using('System.3rdParty.SafeHtml.HTMLSax3'); /** * - * SafeHTML Parser + * TSafeHtmlParser * * This parser strips down all potentially dangerous content within HTML: *