[pmwiki-users] bug in commentbox

Hans design at softflow.co.uk
Thu Mar 23 04:30:55 CST 2006

Thursday, March 23, 2006, 9:42:07 AM, Hans wrote:
> Using  the commentbox Post, posting something, or nothing, will strip
> some backslashes from the page, wherever those backslashes are, end of
> line or in the line.

What I think is happening is this:
In commentbox.php the Handle...Post functions returning
$_POST['text']; correctly, with the previous page content added.
Then it is handed to HandleEdit($pagename);
Here stripmagic is removing backslashes, and the result is the bug.

Code in HandleEdit in pmwiki.php:
 foreach((array)$EditFields as $k)
    if (isset($_POST[$k])) $new[$k]=str_replace("\r",'',stripmagic($_POST[$k]));

As  $_POST['text'] is set stripmagic is called.

Any idea how to prevent this?


More information about the pmwiki-users mailing list