summaryrefslogtreecommitdiff
path: root/framework/3rdParty/SafeHtml
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-07-06 13:23:26 +0000
committerctrlaltca@gmail.com <>2011-07-06 13:23:26 +0000
commit07a205ffd62910c79e09c5fd5247868c4b163ec5 (patch)
tree61632c2f91911f07d99951a5ea632b54ce87b260 /framework/3rdParty/SafeHtml
parent907d785046834eacb492a88a0eab9f349921de8d (diff)
fix for #341
Diffstat (limited to 'framework/3rdParty/SafeHtml')
-rw-r--r--framework/3rdParty/SafeHtml/TSafeHtmlParser.php9
1 files changed, 5 insertions, 4 deletions
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:
* <ul>
@@ -43,7 +43,7 @@ Prado::using('System.3rdParty.SafeHtml.HTMLSax3');
*
* <b>Example:</b>
* <pre>
- * $parser =& new SafeHTML();
+ * $parser = Prado::createComponent('System.3rdParty.SafeHtml.TSafeHtmlParser');
* $result = $parser->parse($doc);
* </pre>
*
@@ -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", '&lt;', $doc);
// UTF-7 encoding ASCII decode
- $doc = $this->repackUTF7($doc);
+ if($isUTF7)
+ $doc = $this->repackUTF7($doc);
// Instantiate the parser
$parser= new TSax3();