[pLog-svn] r6434-plog/branches/lifetype-1.2/class/summary/action

Mark Wu markplace at gmail.com
Fri May 2 01:09:15 EDT 2008


Mmm ... , yes ...

You can pass the characterset, encoding information into htmlentities  

string htmlentities  ( string $string  [, int $quote_style  [, string
$charset  [, bool $double_encode  ]]] ) 

The modification should be in TextFilter() class.

The problem is we already remove the html tags, why we need to convert the
characters to html entitles??

I think It will cause problem here.

> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net 
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
> Sent: Friday, May 02, 2008 12:57 PM
> To: LifeType Developer List
> Subject: Re: [pLog-svn] 
> r6434-plog/branches/lifetype-1.2/class/summary/action
> 
>  	Right, but the real problem is that htmlentities() 
> doesn't understand CJK characters, and filters them out, or 
> filters out half of the bytes because it thinks they are 
> entities, and in later versions of php, it at least works 
> better, because you can pass in the encoding type. 
> I vaguely recall that people said a year or two ago that it 
> didn't work perfectly for CJK stuff yet, but I didn't know if 
> that was fixed, in 5.2, etc. or if it is still broken.
> 
> On Fri, 2 May 2008, Mark Wu wrote:
> 
> > It is not the problem of PHP4/5, it is the problem of encoding.
> >
> > When we use the filter html entities here, it will break the CJK 
> > characters .
> >
> > So, only filter html tags is a better choice.
> >
> > Mark
> >
> >> -----Original Message-----
> >> From: plog-svn-bounces at devel.lifetype.net
> >> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Jon Daley
> >> Sent: Friday, May 02, 2008 12:40 PM
> >> To: LifeType Developer List
> >> Subject: Re: [pLog-svn] r6434
> >> -plog/branches/lifetype-1.2/class/summary/action
> >>
> >>  	Is this fixed in php5, so that we will be able to turn back on 
> >> filtering, or does our code have to be switched to
> >> UTF8 everywhere, before that will work?
> >>
> >> On Thu, 1 May 2008, mark at devel.lifetype.net wrote:
> >>
> >>> Author: mark
> >>> Date: 2008-05-01 23:24:39 -0400 (Thu, 01 May 2008) New
> >> Revision: 6434
> >>>
> >>> Modified:
> >>>
> >>>
> >> 
> plog/branches/lifetype-1.2/class/summary/action/doblogregistration.cl
> >> a
> >>> ss.php
> >>> Log:
> >>> :( We can not filter html entities here, it will cause
> >> error in CJK environment.
> >>>
> >>> Modified:
> >>>
> >> 
> plog/branches/lifetype-1.2/class/summary/action/doblogregistration.cl
> >> a
> >>> ss.php
> >>> 
> ===================================================================
> >>> ---
> >> plog/branches/lifetype-1.2/class/summary/action/doblogregistra
> >> tion.class.php	2008-05-01 20:05:11 UTC (rev 6433)
> >>> +++
> >> plog/branches/lifetype-1.2/class/summary/action/doblogregistra
> >> tion.class.php	2008-05-02 03:24:39 UTC (rev 6434)
> >>> @@ -24,7 +24,7 @@
> >>> 	    	$this->RegisterAction( $actionInfo, $request );
> >>>
> >>> 			// input filters
> >>> -			$this->_request->registerFilter(
> >> "blogName", new HtmlFilter( true ));
> >>> +			$this->_request->registerFilter(
> >> "blogName", new HtmlFilter());
> >>>
> >>> 	    	// data validation
> >>> 	    	//$this->registerFieldValidator( "userId", new 
> >>> IntegerValidator());
> >>>
> >>> _______________________________________________
> >>> pLog-svn mailing list
> >>> pLog-svn at devel.lifetype.net
> >>> http://limedaley.com/mailman/listinfo/plog-svn
> >>>
> >>
> >> --
> >> Jon Daley
> >> http://jon.limedaley.com/
> >>
> >> Scientists have proven that it's impossible to long-jump 
> 30 feet, but 
> >> I don't listen to that kind of talk.
> >> Thoughts like that have a way of sinking into your feet.
> >> -- Carl Lewis
> >> _______________________________________________
> >> 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
> >
> 
> --
> Jon Daley
> http://jon.limedaley.com/
> 
> Faith is a simple trust in a personal redeemer.
> The simpler our trust in Christ for all things, the surer our peace.
> -- William Adams
> _______________________________________________
> 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