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

Jon Daley plogworld at jon.limedaley.com
Mon Mar 12 20:44:15 EDT 2007


 	html_entity_decode was originally missing from php, and was added 
in version 4.3.  So, lots of people (including LifeType) wrote their own. 
Our original version (rev 4590) was not the opposite of 
filterHtmlEntities(), so I changed it to actually be the opposite of that 
function, so that $x = filterHtmlEntities(htmlDecode($x)) should leave $x 
as the same thing - I guess that could be a good test - I think that 
should work.
 	Mark's change is mostly a revert to the old behavior, though the 
numerical entity conversions are still there.  Almost all html escape 
codes (  < etc) will be broken if people want to be able to type 
them - or I would guess if they use the HTML editor, the entities will be 
typed for them, I think, though that is a guess.
 	Probably how we have to fix it is to get the list of entities to 
convert, and write our own utf version of it.  Or basically backport the 
php5 version of html_entities_decode to our own code.  I don't know how 
hard that would be.

On Tue, 13 Mar 2007, Oscar Renalias wrote:
> So what's it going to be? To be sincere I never understood the
> original fix, and I don't understand the fix for the fix and how it
> works.
>
> I'm very keen on releasing 1.2 as soon as possible and now that this
> has become an issue, we'd better fix it soon.
>
> On 12 Mar 2007, at 17:57, Jon Daley wrote:
>
>>  	What if we use this function?
>> http://php.net/manual/en/function.html-entity-decode.php
>>
>> It says it supports other character sets - oh, only in php5.
>>
>>
>> On Mon, 12 Mar 2007, Jon Daley wrote:
>>
>>> 	I don't know how to classify "serious".  It has to do with ending
>>> up with &&&&&  sort of things
>>> whenever you
>>> edit a post.
>>>
>>> On Mon, 12 Mar 2007, Mark Wu wrote:
>>>> "all of the HTML bugs come back again"?
>>>>
>>>> What bugs will come back?
>>>>
>>>> If those are seious bugs, then just fix them for all charsets,
>>>> not just
>>>> leave them there for CJK user.
>>>>
>>>> AS I told you, I can test those characters one by one ... But
>>>> need some
>>>> time.
>>>>
>>>> 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: Monday, March 12, 2007 10:14 PM
>>>>> To: plog-svn at devel.lifetype.net
>>>>> Subject: Re: [pLog-svn] r5062 - plog/branches/lifetype-1.2/class/
>>>>> data
>>>>>
>>>>>  	I don't know what to say - leaving it this way breaks
>>>>> it for all non-CJK environments, leaving it your way breaks
>>>>> it for the CJK environments.  I don't think there is a good
>>>>> answer, although I dislike having all of the HTML bugs come
>>>>> back again.  I guess we could tell people to replace their
>>>>> textfilter.class.php as soon as they download the package.
>>>>>
>>>>>
>>>>> On Mon, 12 Mar 2007, Mark Wu wrote:
>>>>>
>>>>>>
>>>>>>>  	Could we have an if(locale == CJK) or something to get
>>>>> around it
>>>>>>> for now?  I think Oscar wants to release 1.2 now, and I
>>>>> don't think
>>>>>>> we should release it with the HTML_ENTITES not being
>>>>> escaped - people
>>>>>>> will see it as something breaking in 1.2, since it worked in
>>>>>>> 1.1.5.
>>>>>>
>>>>>> How about we leave it as HTML_SPECIALCHARS in 1.2, and do
>>>>> HTML_ENTITES
>>>>>> in 1.2.1? It will be easier.
>>>>>>
>>>>>>>  	And presumably, you wouldn't want to see it released with
>>>>>>> HTML_ENTITIES being escaped -- which, by the way - have you (or
>>>>>>> whoever found this problem) not upgraded to 1.1.5?
>>>>>>
>>>>>> This cuase a big problem in Chinese forum recently, that's why I
>>>>>> notice this. And I though it was MySQL's problem not use,
>>>>> that why I
>>>>>> never try to fix this.
>>>>>>
>>>>>> _______________________________________________
>>>>>> pLog-svn mailing list
>>>>>> pLog-svn at devel.lifetype.net
>>>>>> http://limedaley.com/mailman/listinfo/plog-svn
>>>>>>
>>>>>
>>>>> --
>>>>> Jon Daley
>>>>> http://jon.limedaley.com/
>>>>>
>>>>> After your hands become coated with grease,
>>>>>    your nose will begin to itch.
>>>>> -- Lorenz's Law of Mechanical Repair
>>>>> _______________________________________________
>>>>> 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/
>>>
>>> Hey, this is the government. You just can't expect five 9s
>>> -- Chief Justice, on the Gore/Bush election's narrow margin
>>> _______________________________________________
>>> pLog-svn mailing list
>>> pLog-svn at devel.lifetype.net
>>> http://limedaley.com/mailman/listinfo/plog-svn
>>>
>>
>> --
>> Jon Daley
>> http://jon.limedaley.com/
>>
>> Travel agent to customers: Rustic used to mean no indoor plumbing.
>> Now it means no computers.
>> _______________________________________________
>> 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/

A mighty fortress is our God, a bulwark never failing.
-- Martin Luther


More information about the pLog-svn mailing list