[pLog-svn] r3433 - plog/trunk/class/view/admin

Mark Wu markplace at gmail.com
Thu May 18 20:12:10 GMT 2006


I see. I will take a look.

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: Friday, May 19, 2006 3:56 AM
> To: plog-svn at devel.lifetype.net
> Subject: Re: [pLog-svn] r3433 - plog/trunk/class/view/admin
> 
> To tell you the truth, I don't remember.
> 
> I think I copied this from a patch somebody submitted in 
> bugs.lifetype.net regading this issue. It seemed to make 
> sense back then... You might be able to find the relevant 
> change by browsing the svn history for this file.
> 
> Oscar
> 
> On 18 May 2006, at 22:00, Mark Wu wrote:
> 
> > Hi Oscar:
> >
> > I just have no idea do we really need to do the conversion when we  
> > edit the
> > post...?
> >
> > I mean convert the "&" to  "&" ..
> >
> > What is our original purpose? Because to fit xhtml spec??
> >
> > I suppose we already process the post before we save it, then why  
> > we need to
> > convert them back when we edit it??
> >
> > 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: Thursday, May 18, 2006 7:41 PM
> >> To: plog-svn at devel.lifetype.net
> >> Subject: RE: [pLog-svn] r3433 - plog/trunk/class/view/admin
> >>
> >>  	Heresy! You can do anything with a single regexp -
> >> solve world hunger, etc.  :)
> >>
> >>  	So the problem with &aaaaaa; is that it is an invalid
> >> html escape sequence, and so should be ignored?  I guess you
> >> would need a list of the valid escape sequences and just do those.
> >>
> >>  	Your example from php.net looks good.  If you don't
> >> want to do this right now, you should probably add it to
> >> bugs.lifetype, so we don't forget.
> >>
> >> On Thu, 18 May 2006, Mark Wu wrote:
> >>> Hi Jon:
> >>>
> >>> I tried the following regexpt before I commit the changes.
> >>>
> >>> "&[a-z0-9]+;"
> >>>
> >>> But it fail in some situation, it won't convert "&aaaaaaa;" to
> >>> "&aaaaaaa;" ..... Actually, I want it to be convert to
> >> the new string.
> >>>
> >>> The most important thing is, I can not reproduce any
> >> soosa's error in
> >>> my locale  machine (both linux/window, firefox/ie), that 
> why I just
> >>> only do this part ... :(
> >>>
> >>> If we want to convert all escape html, then... I think we need to
> >>> write a function here, instead of a single regexp.. It is
> >> too hard to
> >>> take care all situation in one regexp.
> >>>
> >>> 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: Thursday, May 18, 2006 7:27 PM
> >>>> To: plog-svn at devel.lifetype.net
> >>>> Subject: Re: [pLog-svn] r3433 - plog/trunk/class/view/admin
> >>>>
> >>>>  	This looks really bizarre?  You are trying to replace &
> >> with &
> >>>> only if it isn't already &?  There must be a better way to do
> >>>> that.
> >>>>
> >>>> Also, perhaps you really want to replace a & if it isn't
> >> followed by
> >>>> "[a-z0-9]+;" to cover all cases of escaped html?
> >>>>
> >>>>
> >>>> On Thu, 18 May 2006, mark at devel.lifetype.net wrote:
> >>>>> Author: mark
> >>>>> Date: 2006-05-18 10:46:03 +0000 (Thu, 18 May 2006) New Revision:
> >>>>> 3433
> >>>>>
> >>>>> Modified:
> >>>>>   plog/trunk/class/view/admin/admineditpostview.class.php
> >>>>> Log:
> >>>>> Fixed the bug here: http://bugs.lifetype.net/view.php?id=896
> >>>>>
> >>>>> Modified: 
> plog/trunk/class/view/admin/admineditpostview.class.php
> >>>>>
> >> ===================================================================
> >>>>> --- plog/trunk/class/view/admin/admineditpostview.class.php
> >>>> 2006-05-18 10:41:43 UTC (rev 3432)
> >>>>> +++ plog/trunk/class/view/admin/admineditpostview.class.php
> >>>> 2006-05-18 10:46:03 UTC (rev 3433)
> >>>>> @@ -50,8 +50,8 @@
> >>>>>
> >>>>> 	            // set information about the post itself
> >>>> into the view
> >>>>> 	            $this->setValue( "postTopic",
> >>>> $this->_article->getTopic());
> >>>>> -	            $this->setValue( "postText",
> >>>> preg_replace('/&/', '&', $this->_article->getIntroText()));
> >>>>> -	            $this->setValue( "postExtendedText",
> >>>> preg_replace('/&/','&',$this->_article->getExtendedText()));
> >>>>> +	            $this->setValue( "postText",
> >>>> preg_replace('/(&|&)/', '&',
> >>>> $this->_article->getIntroText()));
> >>>>> +	            $this->setValue( "postExtendedText",
> >>>> preg_replace('/(&|&)/','&',$this->_article->getExtende
> >>>> dText()));
> >>>>> 	            $this->setValue( "postSlug",
> >>>> $this->_article->getPostSlug());
> >>>>> 	            $this->setValue( "postId",
> >>>> $this->_article->getId());
> >>>>> 	            if( $this->_article->getCommentsEnabled())
> >>>>>
> >>>>> _______________________________________________
> >>>>> pLog-svn mailing list
> >>>>> pLog-svn at devel.lifetype.net
> >>>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
> >>>>>
> >>>>
> >>>> **************************************
> >>>> Jon Daley
> >>>> http://jon.limedaley.com/
> >>>>
> >>>> The difference between genius and stupidity is that 
> genius has its
> >>>> limits.
> >>>> -- Anonymous
> >>>> _______________________________________________
> >>>> pLog-svn mailing list
> >>>> pLog-svn at devel.lifetype.net
> >>>> http://devel.lifetype.net/mailman/listinfo/plog-svn
> >>>
> >>> _______________________________________________
> >>> pLog-svn mailing list
> >>> pLog-svn at devel.lifetype.net
> >>> http://devel.lifetype.net/mailman/listinfo/plog-svn
> >>>
> >>
> >> **************************************
> >> Jon Daley
> >> http://jon.limedaley.com/
> >>
> >> With memory prices this low, who needs to deallocate memory?
> >> _______________________________________________
> >> pLog-svn mailing list
> >> pLog-svn at devel.lifetype.net
> >> http://devel.lifetype.net/mailman/listinfo/plog-svn
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://devel.lifetype.net/mailman/listinfo/plog-svn
> >
> 
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn



More information about the pLog-svn mailing list