Weaving Dream Dede Message Board Admin reply can no longer edit the modified workaround

Source: Internet
Author: User

When the administrator of the message after a reply, you can no longer edit, do not know why the current bug, and in the subsequent version there is no solution, here I would like to explain how to solve this bug, resulting in a reply can not be edited after the reason is because, after the first reply, there are single quotes, So when the second reply is not a single quotation mark filtering, that is, in the original message to escape the single quotation marks, resulting in this situation;

Workaround:

Open,/plus/guestbook/edit.inc.php.

Found,://Administrator reply does not filter HTML
if ($g _isadmin)
{
$msg = "<div class=\ ' rebox\ ' >". $msg. " </div>n ". $remsg;
$remsg <br><font color=red> Admin reply:</font>
}
Else
{
$row = $dsql->getone ("Select msg from ' Dede_guestbook' where id= ' $id '");
$oldmsg = "<div class=\ ' rebox\ ' >". Addslashes ($row [' msg ']). " </div>n ";
$remsg = Trimmsg (CN_SUBSTRR ($remsg, 1024), 1);
$msg = $oldmsg. $remsg;
}

You can change the single-quote escape to double-quote.

if ($g _isadmin)
{

$msg = ' <div class= ' Rebox > '. $msg. " </div>n ". $remsg;
$remsg <br><font color=red> Admin reply:</font>
Echo $msg;

}
Else
{
$row = $dsql->getone ("Select msg from ' Dede_guestbook' where id= ' $id '");
$oldmsg = ' <div class= ' Rebox > '. addslashes ($row [' msg ']). " </div>n ";
$remsg = Trimmsg (CN_SUBSTRR ($remsg, 1024), 1);
$msg = $oldmsg. $remsg;

}

Weaving Dream Dede Message Board Admin reply can no longer edit the modified workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.