[pLog-svn] r5062 - plog/branches/lifetype-1.2/class/data
mark at devel.lifetype.net
mark at devel.lifetype.net
Mon Mar 12 09:08:27 EDT 2007
Author: mark
Date: 2007-03-12 09:08:27 -0400 (Mon, 12 Mar 2007)
New Revision: 5062
Modified:
plog/branches/lifetype-1.2/class/data/textfilter.class.php
Log:
Fixed the htmlDecode for CJK characters.
Modified: plog/branches/lifetype-1.2/class/data/textfilter.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/data/textfilter.class.php 2007-03-12 12:56:35 UTC (rev 5061)
+++ plog/branches/lifetype-1.2/class/data/textfilter.class.php 2007-03-12 13:08:27 UTC (rev 5062)
@@ -233,12 +233,13 @@
*/
function htmlDecode( $htmlString, $quote_style = ENT_QUOTES )
{
- // replace numeric entities
+ // replace numeric entities
$htmlString = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $htmlString);
$htmlString = preg_replace('~&#([0-9]+);~e', 'chr(\\1)', $htmlString);
- // replace literal entities
- $trans_tbl = get_html_translation_table(HTML_ENTITIES);
+ // replace literal entities
+ $trans_tbl = get_html_translation_table( HTML_SPECIALCHARS, $quote_style );
$trans_tbl = array_flip($trans_tbl);
+ $trans_tbl['''] = "'";
return strtr($htmlString, $trans_tbl);
}
More information about the pLog-svn
mailing list