[pmwiki-users] bug in commentbox - fix introduces bug

John Rankin john.rankin at affinity.co.nz
Sun Mar 26 17:56:45 CST 2006


On Friday, 24 March 2006 3:32 PM, John Rankin <john.rankin at affinity.co.nz> wrote:
>On Friday, 24 March 2006 5:38 AM, Hans <design at softflow.co.uk> wrote:
>>Thursday, March 23, 2006, 3:12:19 PM, Patrick wrote:
>>> I don't have a great answer for this (other than it's another
>>> PHP brain-dead feature) -- for now I'd suggest adding the slashes
>>> only if get_magic_quotes_gpc() returns true.
>>
>>Thanks for the info!
>>I added the following code to the various handling functions in
>>commentboxstyled.php:
>>
>>   if(get_magic_quotes_gpc()==1)
>>        $page['text'] = addslashes($page['text']);
>>
>>commentboxstyled.php is updated on pmwiki.org.
>>        
>>Best,
>> Hans                           
>>
Unfortunately, this fix creates a problem with comment
heading formats of the form:

!!!!%block class='commenthead'%$Date

The "'" marks get escaped with a backslash so the code
that checks to see if this is a new day or a new comment
on the current day gets confused. I think it's just a 
sequencing thing.

I am looking into it, but haven't fully tested the solution.
I'm also tidying up the handler functions, so the fix will 
only be required in one place in the commentbox code.

-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list