[pLog-svn] r5062 - plog/branches/lifetype-1.2/class/data

Mark Wu markplace at gmail.com
Mon Mar 12 09:20:29 EDT 2007


I did not revert the change ^_^

I just fixed it.

Use HTML_ENTITES to get the translation table will break some CJK
characters. So, change to HTML_SPECIALCHARS is a better way.

Mark
 

> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net 
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of 
> Oscar Renalias
> Sent: Monday, March 12, 2007 9:10 PM
> To: plog-svn at devel.lifetype.net
> Subject: Re: [pLog-svn] r5062 - plog/branches/lifetype-1.2/class/data
> 
> Did you find the reason why and who made this change? It 
> would be worth checking before reverting the changes...
> 
> On 3/12/07, mark at devel.lifetype.net <mark at devel.lifetype.net> wrote:
> > 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['&#39;'] = "'";
> >              return strtr($htmlString, $trans_tbl);
> >                 }
> >
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://limedaley.com/mailman/listinfo/plog-svn
> >
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
> 



More information about the pLog-svn mailing list