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 --- framework/3rdParty/SafeHtml/TSafeHtmlParser.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'framework/3rdParty/SafeHtml') 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: *
- * $parser =& new SafeHTML(); + * $parser = Prado::createComponent('System.3rdParty.SafeHtml.TSafeHtmlParser'); * $result = $parser->parse($doc); ** @@ -589,7 +589,7 @@ class TSafeHtmlParser * @return string Processed (X)HTML document * @access public */ - public function parse($doc) + public function parse($doc, $isUTF7=false) { $this->clear(); @@ -603,7 +603,8 @@ class TSafeHtmlParser $doc = str_replace("\xC0\xBC", '<', $doc); // UTF-7 encoding ASCII decode - $doc = $this->repackUTF7($doc); + if($isUTF7) + $doc = $this->repackUTF7($doc); // Instantiate the parser $parser= new TSax3(); -- cgit v1.2.3