Jump to content

Slashes appearing in phpBB post previews. Missing 'stripslashes'?


Voronwe

Recommended Posts

Hello all, I am asking for help regarding a problem with a phpBB forum and a recent mod integrating it with the phpMyChat program. I asked for help in the phpBB community, but since my problem revolves around a third-party mod, they couldn't offer any support. 

 

The issue is that ever since I installed a custom-made mod to integrate our forum with phpMyChat, there now appears slashes (/) behind every apostrophe or quote mark when you preview a post.  They do not show up in the actual preview at first, but appear in the text editing box of the preview page and will show up in your actual post if you do not catch this and press "submit".  I have narrowed the problem down to the following lines of code in the page_header.php file of phpBB, but cannot see what could possibly be causing the error.  Any help would be greatly appreciated, as I'm totally lost with what to look for!  (The mod name on our boards is Echo Rock)

 

//
// Begin Echo Rock
//


/*********** COMMON WORK ***********/


$ChatPath = "chat/";   // relative path to chat dir, empty value if this
                  // file is in the same dir than the chat;
require("/home/chat/lib/index.lib.php3");

// Both values are boolean. See explanations in 'index.lib.php3' file.
send_headers(1,1);

$Is_Error = (isset($Error));

if (isset($HTTP_COOKIE_VARS))
{
   if (isset($HTTP_COOKIE_VARS["CookieUsername"])) $CookieUsername = $HTTP_COOKIE_VARS["CookieUsername"];
   if (isset($HTTP_COOKIE_VARS["CookieRoom"])) $CookieRoom = $HTTP_COOKIE_VARS["CookieRoom"];
   if (isset($HTTP_COOKIE_VARS["CookieRoomType"])) $CookieRoomType = $HTTP_COOKIE_VARS["CookieRoomType"];
};
$Username = (isset($CookieUsername) ? $CookieUsername : "");
$Room_name = (isset($CookieRoom) ? $CookieRoom : "");
$Room_type = (isset($CookieRoomType) ? $CookieRoomType : "");

layout($Is_Error,$Username,$Room_name,$Room_type);

//
// End Echo Rock
//

//
// Begin Echo Rock
//

$DefaultRoomFound = 0;
if($DbLink->query("SELECT DISTINCT u.username FROM ".C_USR_TBL." u, ".C_MSG_TBL." m WHERE u.room = m.room AND m.type = 1"))
{
   $Nb = $DbLink->num_rows();
   $link = "<A HREF=\"${ChatPath}users_popupL.php3?From=$From&L=$L\" onClick=\"users_popup(); return false\" TARGET=\"_blank\">";   
}
if(isset($Error))
{
   echo("<P CLASS=\"ChatError\">$Error</P>");
}
if (!isset($Ver)) $Ver = "L";

if($Nb == 0) {
   $echo_user = "people";
   $echo_grammar = "are";
} elseif($Nb > 1) {
   $echo_user = "people";
   $echo_grammar = "are";
} else {
   $echo_user = "person";
   $echo_grammar = "is";
}

$echo_current1 = $L_CUR_1;
$echo_nb = $Nb;
$echo_l_users = $L_USERS;
$echo_l_user = $L_USER;
$echo_current2 = $L_CUR_2;

//
// End Echo Rock
//


   // Begin Echo Rock
   
   'ECHO_CURRENT1' => $echo_current1,
   'ECHO_NB' => $echo_nb,
   'ECHO_USER' => $echo_user,
   'ECHO_GRAMMAR' => $echo_grammar,
   'ECHO_LINK' => $link,
   
   // End Echo Rock

 

Is it necessarily a missing 'stripslashes' command somewhere? Or could something less obvious be the problem?

 

Thanks in advance for any help!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.