[pLog-svn] BlogNameValidator() cause Chinese blog name error!

Jon Daley plogworld at jon.limedaley.com
Tue Sep 11 12:51:03 EDT 2007


 	I understand that it returns an empty string, but the problem 
isn't in the blognamevalidator, but in urlize and domainize, which are 
used in other places in the code.  Don't you have issues elsewhere?

On Wed, 12 Sep 2007, Mark Wu wrote:

> Hi Jon:

Agreed.

But, I don't think it can be fixed if we use domainze() function. It is
because the  domainize() and urlize() will remove some invalid characters
that not allowed in url.

Sometimes, the whole Chinese sentence after domainize() or urlize will
return empty string, or the same string as another different Chinese
sentence.

Take the Chinese sentence "台北教會" for example, It means "church in
Taipei". After domainze(), it will return EMPTY string. So, user can not
create new blog .....

That's why I said I have to change it back to string validator ONLY IF the
blog admin does not enable subdomain or blogdomain.

Or the most Chinese user can not add new blog at this moment , it is really
not good.

** The best way to solve this is add a blog_slug to blogInfo, it is
different to blog name. It can avoid all this kind of problem.

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: Tuesday, September 11, 2007 9:24 PM
> To: LifeType Developer List
> Subject: Re: [pLog-svn] BlogNameValidator() cause Chinese 
> blog name error!
>
>  	I don't think changing it to string validator is the 
> right answer, since we use urlize and domainize other places, 
> so if they are broken for chinese characters, they need to be 
> fixed, otherwise, you will have issues in other places too.
>  	A string validator doesn't do anything, so we can't 
> count on that to actually validate the data.
> 
> On Tue, 11 Sep 2007, Mark Wu wrote:
> 
> > Hi Oscar & Jon:
> >
> > It seems the new BlogNameValidator will cause some error when user 
> > enter Chinese blog name.
> >
> > I am still checking on it, it seems the new 
> Textfilter::domanize() or
> > Textfilter::urlize()  casue the error.
> >
> > If I can not fix this bug, I will change it back to string 
> validator 
> > if blog admin does not enable subdomain and blogdomain function. It 
> > can avoid this kind of problem.
> >
> > Mark
> >
> 
> --
> Jon Daley
> http://jon.limedaley.com/
> 
> The real world is
> a special case.
> -- Horngren's Observation
> _______________________________________________
> 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/

Keep your face to the sunshine and you cannot see the shadow.
-- Helen Keller


More information about the pLog-svn mailing list